From 3f72c39fb0e95d45d15bde64661040e920574a85 Mon Sep 17 00:00:00 2001 From: aqua Date: Tue, 23 Apr 2024 11:22:02 +0300 Subject: Ported to qt6 --- meson.build | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 1351796..6534910 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('smolbote', ['cpp'], version: '0.1.0', default_options: ['cpp_std=c++2a', 'warning_level=3'], license: 'GPL3', - meson_version: '>=0.55.0' + meson_version: '>=0.57.0' ) kconfig = import('keyval') @@ -11,7 +11,7 @@ kconf = kconfig.load(host_machine.system() + '/.config') cdata = configuration_data(kconf) version_h = vcs_tag( - command: [find_program('git').path(), 'describe', '--long', '--abbrev=40'], + command: [find_program('git').full_path(), 'describe', '--long', '--abbrev=40'], #fallback: defaults to meson.project_version(), input: 'include/version.h.in', output: 'version.h' @@ -75,25 +75,26 @@ add_project_arguments(cxx.get_supported_arguments([ ]), language: 'cpp') # Dependencies -mod_qt5 = import('qt5') -dep_qt5 = dependency('qt5', - modules: [ 'Core', 'Network', 'Widgets', 'Svg', 'WebEngine', 'WebEngineWidgets', 'Concurrent' ], +mod_qt5 = import('qt6') +dep_qt5 = dependency('qt6', + modules: [ 'Core', 'Network', 'Widgets', 'SvgWidgets', 'WebEngineCore', 'WebEngineWidgets', 'Concurrent' ], include_type: 'system' ) dep_spdlog = dependency('spdlog', fallback: ['spdlog', 'spdlog_dep'], version: '>=1.3.1') +dep_fmt = dependency('fmt') optional_deps = [] poi_cpp_args = [] -dep_breakpad = dependency('breakpad-client', include_type: 'system', required: get_option('crashhandler')) -dep_threads = dependency('threads', include_type: 'system', required: get_option('crashhandler')) +dep_breakpad = disabler() # dependency('breakpad-client', include_type: 'system', required: get_option('crashhandler')) +dep_threads = disabler() # dependency('threads', include_type: 'system', required: get_option('crashhandler')) if dep_breakpad.found() poi_cpp_args += '-DHAVE_BREAKPAD' endif dep_gtest = dependency('gtest', required: false, disabler: true) -dep_catch = dependency('catch2', required: true, fallback: ['catch2', 'catch2_dep'] ) +dep_catch = disabler() # dependency('catch2', required: true, fallback: ['catch2', 'catch2_dep'] ) dep_SingleApplication = dependency('singleapplication', fallback: [ 'singleapplication', 'SingleApplication_dep' ]) dep_args = dependency('args.hxx', fallback: [ 'args', 'args_dep' ]) @@ -122,10 +123,10 @@ subdir('test/firefox-bookmarks-json-parser') ssconfig = poi_sourceset.apply(cdata) poi_exe = executable(get_option('poi'), - cpp_args: ['-DQAPPLICATION_CLASS=QApplication', poi_cpp_args], + cpp_args: ['-DQAPPLICATION_CLASS=QApplication', '-DSPDLOG_FMT_EXTERNAL=1', poi_cpp_args], sources: [ssconfig.sources()], include_directories: [ plugininterfaces_include, include_directories('src') ], - dependencies: [ dep_qt5, dep_spdlog, dep_SingleApplication, dep_args, optional_deps, dep_bookmarks, dep_configuration, dep_downloads, dep_pluginloader, dep_urlfilter, ssconfig.dependencies(), lib_session_formats ], + dependencies: [ dep_qt5, dep_spdlog, dep_fmt, dep_SingleApplication, dep_args, optional_deps, dep_bookmarks, dep_configuration, dep_downloads, dep_pluginloader, dep_urlfilter, ssconfig.dependencies(), lib_session_formats ], install: true, ) @@ -137,6 +138,6 @@ subdir(host_machine.system()) cppcheck = find_program('cppcheck', required: false) if cppcheck.found() run_target('cppcheck', - command: [cppcheck, '--enable=all', '--project=' + meson.build_root() / 'compile_commands.json'] + command: [cppcheck, '--enable=all', '--project=' + meson.project_build_root() / 'compile_commands.json'] ) endif -- cgit v1.2.1