From 142b2e4edeb1be1f3d5d5ea665e535d8d62bb597 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 22 May 2014 14:52:52 +0200 Subject: [PATCH] cmake: Fix libssh cmake-config files. --- CMakeLists.txt | 14 +++++++++----- libssh-config.cmake.in | 6 ++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8d28b3f..48559f37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,18 +97,22 @@ install( ) # cmake config files -configure_file(libssh-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libssh-config.cmake @ONLY) -configure_file(libssh-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libssh-config-version.cmake @ONLY) +set(LIBSSH_LIBRARY_NAME @CMAKE_SHARED_LIBRARY_PREFIX@ssh@CMAKE_SHARED_LIBRARY_SUFFIX@) +set(LIBSSH_THREADS_LIBRARY_NAME @CMAKE_SHARED_LIBRARY_PREFIX@ssh@CMAKE_SHARED_LIBRARY_SUFFIX@) + +configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY) +configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY) install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/libssh-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/libssh-config-version.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake DESTINATION - ${CMAKE_INSTALL_DIR}/libssh + ${CMAKE_INSTALL_DIR}/${PROJECT_NAME} COMPONENT devel ) + # in tree build settings configure_file(libssh-build-tree-settings.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libssh-build-tree-settings.cmake @ONLY) diff --git a/libssh-config.cmake.in b/libssh-config.cmake.in index 1e287fae..fa9cecf8 100644 --- a/libssh-config.cmake.in +++ b/libssh-config.cmake.in @@ -7,5 +7,7 @@ else() set(LIBSSH_INCLUDE_DIR @INCLUDE_INSTALL_DIR@) endif() -set(LIBSSH_LIRBARY @LIB_INSTALL_DIR@/libssh.so) -set(LIBSSH_LIRBARIES @LIB_INSTALL_DIR@/libssh.so) +set(LIBSSH_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@) +set(LIBSSH_LIBRARIES @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@) + +set(LIBSSH_THREADS_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_THREADS_LIBRARY_NAME@)