Skip to content

Commit

Permalink
Install cmake files into an arch-independent directory
Browse files Browse the repository at this point in the history
The justification is similar as for the .pc file: the include directory
is arch-independent, so the cmake description should be too.
  • Loading branch information
keszybz committed Mar 6, 2024
1 parent c7c1eac commit 9f53572
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ import('pkgconfig').generate(
dataonly: true,
)

shared_cmake_dir = get_option('prefix') / 'share/cmake/xbyak'
if meson.version().version_compare('>=0.50.0')
cmake = import('cmake')

cmake.write_basic_package_version_file(
name: meson.project_name(),
version: meson.project_version()
version: meson.project_version(),
install_dir: shared_cmake_dir,
)

cmake_conf = configuration_data()
Expand All @@ -43,6 +45,7 @@ if meson.version().version_compare('>=0.50.0')
cmake.configure_package_config_file(
name: meson.project_name(),
input: 'cmake'/'meson-config.cmake.in',
configuration: cmake_conf
configuration: cmake_conf,
install_dir: shared_cmake_dir,
)
endif

0 comments on commit 9f53572

Please sign in to comment.