2020-05-25 12:21:43 +02:00
|
|
|
lite_sources = [
|
|
|
|
'api/api.c',
|
|
|
|
'api/renderer.c',
|
2021-06-02 21:27:00 +02:00
|
|
|
'api/regex.c',
|
2020-05-25 12:21:43 +02:00
|
|
|
'api/system.c',
|
2021-06-18 20:19:09 +02:00
|
|
|
'api/process.c',
|
2022-04-26 15:42:02 +02:00
|
|
|
'api/utf8.c',
|
2020-05-25 12:21:43 +02:00
|
|
|
'renderer.c',
|
2021-04-29 14:15:24 +02:00
|
|
|
'renwindow.c',
|
2020-05-25 12:21:43 +02:00
|
|
|
'rencache.c',
|
|
|
|
'main.c',
|
|
|
|
]
|
|
|
|
|
2022-03-17 18:43:01 +01:00
|
|
|
# dirmonitor backend
|
|
|
|
if get_option('dirmonitor_backend') == ''
|
|
|
|
if cc.has_function('inotify_init', prefix : '#include<sys/inotify.h>')
|
|
|
|
dirmonitor_backend = 'inotify'
|
|
|
|
elif cc.has_function('kqueue', prefix : '#include<sys/event.h>')
|
|
|
|
dirmonitor_backend = 'kqueue'
|
|
|
|
elif dependency('libkqueue', required : false).found()
|
|
|
|
dirmonitor_backend = 'kqueue'
|
|
|
|
elif host_machine.system() == 'windows'
|
|
|
|
dirmonitor_backend = 'win32'
|
|
|
|
else
|
|
|
|
dirmonitor_backend = 'dummy'
|
|
|
|
warning('no suitable backend found, defaulting to dummy backend')
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
dirmonitor_backend = get_option('dirmonitor_backend')
|
|
|
|
endif
|
|
|
|
|
|
|
|
message('dirmonitor_backend: @0@'.format(dirmonitor_backend))
|
|
|
|
|
|
|
|
if dirmonitor_backend == 'kqueue'
|
|
|
|
libkqueue_dep = dependency('libkqueue', required : false)
|
|
|
|
if libkqueue_dep.found()
|
|
|
|
lite_deps += libkqueue_dep
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
lite_sources += [
|
|
|
|
'api/dirmonitor.c',
|
|
|
|
'api/dirmonitor/' + dirmonitor_backend + '.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2021-08-09 19:32:53 +02:00
|
|
|
lite_rc = []
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
windows = import('windows')
|
|
|
|
lite_rc += windows.compile_resources('../resources/icons/icon.rc')
|
|
|
|
elif host_machine.system() == 'darwin'
|
2021-04-18 17:08:35 +02:00
|
|
|
lite_sources += 'bundle_open.m'
|
|
|
|
endif
|
|
|
|
|
2021-10-08 22:10:17 +02:00
|
|
|
lite_includes += include_directories('.')
|
2021-08-09 19:32:53 +02:00
|
|
|
|
2021-06-24 14:49:18 +02:00
|
|
|
executable('lite-xl',
|
2020-06-03 12:22:17 +02:00
|
|
|
lite_sources + lite_rc,
|
2021-10-08 22:10:17 +02:00
|
|
|
include_directories: lite_includes,
|
2021-06-18 20:19:09 +02:00
|
|
|
dependencies: lite_deps,
|
2020-12-02 00:23:15 +01:00
|
|
|
c_args: lite_cargs,
|
2021-08-19 23:30:44 +02:00
|
|
|
objc_args: lite_cargs,
|
2020-06-02 23:20:22 +02:00
|
|
|
link_args: lite_link_args,
|
2021-08-09 19:32:53 +02:00
|
|
|
install_dir: lite_bindir,
|
2020-05-25 12:21:43 +02:00
|
|
|
install: true,
|
2020-05-25 16:18:06 +02:00
|
|
|
gui_app: true,
|
2020-05-25 12:21:43 +02:00
|
|
|
)
|