From 914e2be5f52f19a995649bed047e9d2d814a6a42 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 23 Feb 2019 22:36:17 +0200 Subject: Add WIP Python REPL interface - Requires Python >= 3.0.0 and linenoise or linenoise-ng - WIP: not built into the browser itself --- meson.build | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index dcae570..9310eb0 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,9 @@ project('smolbote', 'cpp', version: 'master', default_options: ['cpp_std=c++17', 'strip=true', 'warning_level=3'], - license: 'GPL3') + license: 'GPL3', + meson_version: '>=0.49.0' +) # autogenerate qtcreator project files # add_postconf_script(script_name, arg1, arg2, ...) @@ -11,47 +13,46 @@ project('smolbote', 'cpp', # add -DQT_NO_DEBUG to non-debug builds if not get_option('debug') - add_global_arguments('-DQT_NO_DEBUG', language: 'cpp') + add_project_arguments('-DQT_NO_DEBUG', language: 'cpp') endif -# Qt 5 -qt5 = import('qt5') -dep_qt5 = dependency('qt5', modules: ['Core', 'Network', 'Widgets', 'WebEngineWidgets', 'Concurrent', 'Test']) +mod_qt5 = import('qt5') +dep_qt5 = dependency('qt5', modules: ['Core', 'Network', 'Widgets', 'WebEngineWidgets', 'Concurrent']) + +mod_python = import('python') +python3 = mod_python.find_installation('python3') -# Boost dep_boost = dependency('boost', modules: ['program_options']) -# spdlog dep_spdlog = dependency('spdlog', fallback: ['spdlog', 'spdlog_dep'], version: '>=1.3.1') -# Breakpad +optional_deps = [] + if get_option('Breakpad').enabled() -dep_breakpad = declare_dependency( - compile_args: '-DBREAKPAD', - dependencies: [dependency('breakpad-client'), - dependency('threads')] +optional_deps += declare_dependency(compile_args: '-DBREAKPAD', + dependencies: [dependency('breakpad-client'), dependency('threads')] ) -else - dep_breakpad = declare_dependency() endif -# KDE if get_option('Plasma').enabled() -dep_plasma = declare_dependency( - compile_args: '-DPLASMA', - dependencies: [ dependency('KF5WindowSystem', method: 'cmake'), - dependency('KF5Wallet', method: 'cmake')] +optional_deps += declare_dependency(compile_args: '-DPLASMA', + dependencies: [ dependency('KF5WindowSystem', method: 'cmake'), dependency('KF5Wallet', method: 'cmake')] ) -else - dep_plasma = declare_dependency() endif +if get_option('Python').enabled() +optional_deps += declare_dependency(compile_args: '-DPYTHON', + dependencies: [ meson.get_compiler('cpp').find_library('linenoise'), + python3.dependency('python', version: '>=3.0.0')]) + subdir('src/cli') +endif + +dep_gtest = dependency('gtest', required: get_option('testing')) + # Generate config header include = include_directories('include') git = find_program('git').path() -pymod = import('python') -python3 = pymod.find_installation('python3') dep_genheaders = declare_dependency( include_directories: include_directories('.'), @@ -70,13 +71,11 @@ dep_genheaders = declare_dependency( )] ) -interfaces_moc = qt5.preprocess( +interfaces_moc = mod_qt5.preprocess( moc_headers: 'include/profileinterface.h', dependencies: dep_qt5 ) -dep_gtest = dependency('gtest', required: get_option('testing')) - subdir('lib/about') subdir('lib/addressbar') subdir('lib/bookmarks') -- cgit v1.2.1