meson: Install CMake and pkg-config files into architecture-independe… (#60)

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.
This commit is contained in:
Raul Tambre 2020-09-17 15:16:36 +03:00 committed by GitHub
parent bf26a88412
commit 248e6031cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -482,7 +482,8 @@ pkgc = import('pkgconfig')
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,7 +491,8 @@ 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()
@ -498,5 +500,6 @@ if get_option('generate_cmake_config') and not is_subproject
name: meson.project_name(),
input: 'cmake/tomlplusplus.cmake.in',
configuration: cmake_conf,
install_dir: join_paths('lib', 'cmake', meson.project_name()),
)
endif