Skip to content

Commit 37a029e

Browse files
Tom RixDobiasd
authored andcommitted
Improve the install of cmake files
On Fedora the proper install location of cmake files depends on the arch. For example for x86_64, this is /usr/lib64, not /usr/lib. Copy bits from FunctionalPlus' install-rules.cmake to generalize the cmake install location. Signed-off-by: Tom Rix <[email protected]>
1 parent 6adc06f commit 37a029e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/pkgconfig.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
include(CMakePackageConfigHelpers)
2+
include(GNUInstallDirs)
3+
14
# Installation (https://github.com/forexample/package-example) {
25

36
# Layout. This works for all platforms:
47
# * <prefix>/lib/cmake/<PROJECT-NAME>
58
# * <prefix>/lib/
69
# * <prefix>/include/
7-
set(config_install_dir "lib/cmake/${PROJECT_NAME}")
10+
set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
811
set(include_install_dir "include")
912

1013
set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated")

0 commit comments

Comments
 (0)