rootAppInclude = include_directories('.') subdir('actions') subdir('core') subdir('dialogs') subdir('display') subdir('file') subdir('file-data') subdir('gegl') subdir('gui') subdir('menus') subdir('operations') subdir('paint') subdir('pdb') subdir('plug-in') subdir('propgui') subdir('text') subdir('tools') subdir('vectors') subdir('widgets') subdir('xcf') # For app/config app_debug_files = files( 'pika-debug.c', 'pika-log.c', ) # Top-level library libapp_sources = [ 'app.c', 'errors.c', 'pikacoreapp.c', 'pikaconsoleapp.c', 'pika-debug.c', 'pika-log.c', 'pika-update.c', 'pika-version.c', 'language.c', 'sanity.c', 'signals.c', 'unique.c', gitversion_h, pikadbusservice_gen, ] if platform_windows # for PikaDashboard and PikaBacktrace psapi_cflags = [ '-DPSAPI_VERSION=1' ] link_args = [ '-lpsapi' ] else psapi_cflags = [ ] link_args = [] endif if platform_osx link_args += osx_ldflags endif libapp_c_args = [ '-DG_LOG_DOMAIN="Pika"', '-DPIKA_APP_GLUE_COMPILATION', psapi_cflags, ] # Put PIKA core in a lib so we can conveniently link against that in test cases # and main PIKA executable. Note that we should not use this static library for # the console executable as it uses different macro flags. libapp = static_library('app', libapp_sources, include_directories: [ rootInclude, rootAppInclude, configInclude, ], c_args: libapp_c_args, dependencies: [ gdk_pixbuf, gegl, gexiv2, gtk3, ], ) pikaconsole_deps = [ cairo, dbghelp, drmingw, gdk_pixbuf, gegl, gexiv2, gio, gio_specific, lcms, libbacktrace, pangocairo, pangoft2, rpc, ] console_libapps = [ libappcore, libappfile, libappfiledata, libappgegl, libappinternalprocs, libapplayermodes, libapplayermodeslegacy, libappoperations, libapppaint, libapppdb, libappplugin, libapptext, libappvectors, libappxcf, ] libapp_dep = declare_dependency( dependencies: [ pikaconsole_deps, gtk3, ], link_with: [ libapp, console_libapps, ], include_directories: [ rootInclude, rootAppInclude, ], compile_args: psapi_cflags, link_args: link_args, ) # Those subdirs need to link against the first ones subdir('config') subdir('tests') console_libapps += [ libappconfig ] app_libpikas = [ libpikabase, libpikacolor, libpikaconfig, libpikamath, libpikamodule, libpikathumb, ] gui_libapps = [ console_libapps, libappactions, libappdialogs, libappdisplay, libappgui, libappmenus, libapppropgui, libapptools, libappwidgets, libpikawidgets, ] # Executables if platform_windows console_rc_name = 'pika-console-'+ pika_app_version pika_app_console_rc = configure_file( input : pika_plugins_rc.full_path(), output: console_rc_name + '.rc', copy: true, ) console_rc_file = windows.compile_resources( pika_app_console_rc, args: [ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(console_rc_name+'.exe'), '--define', 'INTERNALNAME_STR="@0@"' .format(console_rc_name), '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()), ], include_directories: [ rootInclude, appInclude, ], ) gui_rc_name = 'pika-'+ pika_app_version pika_app_gui_rc = configure_file( input : pika_plugins_rc.full_path(), output: gui_rc_name + '.rc', copy: true, ) gui_rc_file = windows.compile_resources( pika_app_rc, args: [ '--define', 'ORIGINALFILENAME_STR="@0@"'.format(gui_rc_name+'.exe'), '--define', 'INTERNALNAME_STR="@0@"' .format(gui_rc_name), '--define', 'TOP_SRCDIR="@0@"' .format(meson.project_source_root()), ], include_directories: [ rootInclude, appInclude, ], ) else console_rc_file = [] gui_rc_file = [] endif if enable_console_bin pikaconsole_exe = executable('pika-console' + exec_ver, 'main.c', libapp_sources, console_rc_file, c_args: [ libapp_c_args, '-DPIKA_CONSOLE_COMPILATION', ], dependencies: pikaconsole_deps, link_with: [ app_libpikas, console_libapps ], include_directories: [ rootInclude, rootAppInclude, ], link_args: link_args, install: true, ) endif pikamain_exe = executable('pika' + exec_ver, 'main.c', gui_rc_file, c_args: libapp_c_args, dependencies: libapp_dep, link_with: [ app_libpikas, gui_libapps, ], install: true, ) if enable_default_bin and meson.version().version_compare('>=0.61.0') install_symlink(fs.name(pikamain_exe.full_path()).replace(exec_ver, ''), pointing_to: fs.name(pikamain_exe.full_path()), install_dir: get_option('bindir') ) if enable_console_bin install_symlink(fs.name(pikaconsole_exe.full_path()).replace(exec_ver, ''), pointing_to: fs.name(pikaconsole_exe.full_path()), install_dir: get_option('bindir') ) endif endif