1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
From: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Sun, 28 Jul 2019 21:45:59 +0200
Subject: Fix library location
---
CMakeLists.txt | 3 ++-
cmake/PocoMacros.cmake | 11 ++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e05272..7d13604 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -464,7 +464,8 @@ write_basic_package_version_file(
if(WIN32)
set(PocoConfigPackageLocation "cmake")
else()
+ include(GNUInstallDirs)
set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
endif()
configure_file(cmake/${PROJECT_NAME}Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" @ONLY)
diff --git a/cmake/PocoMacros.cmake b/cmake/PocoMacros.cmake
index 038779e..5cf2749 100644
--- a/cmake/PocoMacros.cmake
+++ b/cmake/PocoMacros.cmake
@@ -227,13 +227,14 @@ configure_file("cmake/Poco${target_name}Config.cmake"
)
endif()
+include(GNUInstallDirs)
# Set config script install location in a location that find_package() will
# look for, which is different on MS Windows than for UNIX
# Note: also set in root CMakeLists.txt
if(WIN32)
set(PocoConfigPackageLocation "cmake")
else()
set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
endif()
install(
|