aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2019-07-03 10:10:18 +0200
committerAndreas Schneider <asn@cryptomilk.org>2019-07-04 16:08:34 +0200
commit24af712931cdc2138553534b1a0c3c81120604d6 (patch)
treed1e311819c9a568a16757e6c525d58fec3e4fb31 /CMakeLists.txt
parent519074f13e86667e17e17cd56893eb1e44307745 (diff)
downloadlibssh-24af712931cdc2138553534b1a0c3c81120604d6.tar.gz
libssh-24af712931cdc2138553534b1a0c3c81120604d6.tar.xz
libssh-24af712931cdc2138553534b1a0c3c81120604d6.zip
cmake: Use GNUInstallDirs for installation
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 6 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b89c11f7..077b9b7d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,9 +29,9 @@ set(LIBRARY_SOVERSION "4")
# add definitions
include(DefinePlatformDefaults)
-include(DefineInstallationPaths)
include(DefineOptions.cmake)
include(CPackConfig.cmake)
+include(GNUInstallDirs)
include(CompilerChecks.cmake)
@@ -117,7 +117,7 @@ install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
DESTINATION
- ${LIB_INSTALL_DIR}/pkgconfig
+ ${CMAKE_INSTALL_LIBDIR}/pkgconfig
COMPONENT
pkgconfig
)
@@ -136,18 +136,17 @@ write_basic_package_version_file(libssh-config-version.cmake
# libssh-config.cmake
configure_package_config_file(${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
- INSTALL_DESTINATION ${CMAKE_INSTALL_DIR}/${PROJECT_NAME}
- PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR)
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
+ PATH_VARS CMAKE_INSTALL_FULL_INCLUDEDIR CMAKE_INSTALL_FULL_LIBDIR)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
DESTINATION
- ${CMAKE_INSTALL_DIR}/${PROJECT_NAME}
+ ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
COMPONENT
- devel
-)
+ devel)
if (WITH_EXAMPLES)
add_subdirectory(examples)