aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2019-10-13 18:25:49 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2019-10-13 18:25:49 +0300
commit22e4c0b2bfea51c9f48d0d84e527ffe4c8eb0e25 (patch)
tree296b8e0be37ffd3f46f1d66dcf7d3ffc6f0b6a8a /meson.build
parentAdd some cpp compiler options and warnings (diff)
downloadsmolbote-22e4c0b2bfea51c9f48d0d84e527ffe4c8eb0e25.tar.xz
Improve meson.build files
- meson should now properly create OpenSSL signing key and hexdump before trying to compile plugin loader
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build47
1 files changed, 17 insertions, 30 deletions
diff --git a/meson.build b/meson.build
index 5798c49..6412730 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,23 @@ project('smolbote', 'cpp',
version: '0.1.0',
default_options: ['cpp_std=c++17', 'strip=true', 'warning_level=3'],
license: 'GPL3',
- meson_version: '>=0.49.0'
+ meson_version: '>=0.51.2'
+)
+
+kconfig = import('unstable-kconfig')
+cdata = configuration_data(kconfig.load(host_machine.system() + '/.config'))
+config_h = configure_file(output: 'config.h', configuration: cdata)
+
+version_h = vcs_tag(
+ command: [find_program('git').path(), 'describe', '--long', '--abbrev=40'],
+ #fallback: defaults to meson.project_version(),
+ input: 'include/version.h.in',
+ output: 'version.h'
+)
+
+autogen_config = declare_dependency(
+ include_directories: include_directories('.'),
+ sources: [config_h]
)
# add -DQT_NO_DEBUG to non-debug builds
@@ -27,9 +43,6 @@ add_project_arguments(cxx.get_supported_arguments([
mod_qt5 = import('qt5')
dep_qt5 = dependency('qt5', modules: ['Core', 'Network', 'Widgets', 'WebEngineWidgets', 'Concurrent'])
-mod_python = import('python')
-python3 = mod_python.find_installation('python3')
-
dep_boost = dependency('boost', modules: ['program_options'])
dep_spdlog = dependency('spdlog', fallback: ['spdlog', 'spdlog_dep'], version: '>=1.3.1')
@@ -48,37 +61,11 @@ optional_deps += declare_dependency(compile_args: '-DPLASMA',
)
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()
-
-dep_genheaders = declare_dependency(
- include_directories: include_directories('.'),
- sources: [
- vcs_tag(
- command: [git, 'describe', '--long', '--abbrev=40'],
- #fallback: defaults to meson.project_version(),
- input: 'include/version.h.in',
- output: 'version.h'
- ),
- custom_target('configheader',
- input: ['tools/config.py', 'Kconfig', host_machine.system() + '/.config'],
- output: 'config.h',
- command: [python3, '@INPUT0@', '--kconfig=@INPUT1@', '--dotconfig=@INPUT2@', '--generate=@OUTPUT@'],
- build_by_default: true
- )]
-)
-
interfaces_moc = mod_qt5.preprocess(
moc_headers: 'include/profileinterface.h',
dependencies: dep_qt5