From 248e6031cfed41e24b3bdbed4da6780ff3e3978f Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Thu, 17 Sep 2020 15:16:36 +0300 Subject: [PATCH] =?UTF-8?q?meson:=20Install=20CMake=20and=20pkg-config=20f?= =?UTF-8?q?iles=20into=20architecture-independe=E2=80=A6=20(#60)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit toml++ is header-only so these should be installed into architecture-independent directories to allow them to be found for crosscompiling regardless of the architecture they were installed on. Fixes #59. --- meson.build | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index c2ad0bc..01a82d2 100644 --- a/meson.build +++ b/meson.build @@ -164,7 +164,7 @@ if is_msvc or is_icc_cl '/GF', # string pooling '/openmp-', '/permissive-', - '/sdl-', + '/sdl-', '/utf-8', '/volatile:iso', '/Zc:__cplusplus', @@ -182,7 +182,7 @@ if is_msvc or is_icc_cl '/Oy', # omit frame pointers '/Oi', # generate intrinsics language : 'cpp' - ) + ) add_project_link_arguments('/ltcg', language : 'cpp') endif if is_pedantic @@ -479,10 +479,11 @@ tomlplusplus_dep = declare_dependency( ) pkgc = import('pkgconfig') -pkgc.generate ( +pkgc.generate( name: meson.project_name(), version: meson.project_version(), - description: 'Header-only TOML config file parser and serializer for modern C++' + description: 'Header-only TOML config file parser and serializer for modern C++', + install_dir: join_paths(get_option('datadir'), 'pkgconfig'), ) # cmake @@ -490,13 +491,15 @@ if get_option('generate_cmake_config') and not is_subproject cmake = import('cmake') cmake.write_basic_package_version_file( name: meson.project_name(), - version: meson.project_version() + version: meson.project_version(), + install_dir: join_paths('lib', 'cmake', meson.project_name()), ) - + cmake_conf = configuration_data() cmake.configure_package_config_file( name: meson.project_name(), input: 'cmake/tomlplusplus.cmake.in', configuration: cmake_conf, + install_dir: join_paths('lib', 'cmake', meson.project_name()), ) endif