aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-09-07 07:46:11 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-09-07 07:46:11 +0200
commit5b586fdfecbe12f3f8e69099d809ca96c7cb978e (patch)
tree8ee49721e6209c1189fe717a299c9c0eecaab904 /CMakeLists.txt
parent2f193b5cbb0c57160d3c590140bc04befccfbb32 (diff)
downloadlibssh-5b586fdfecbe12f3f8e69099d809ca96c7cb978e.tar.gz
libssh-5b586fdfecbe12f3f8e69099d809ca96c7cb978e.tar.xz
libssh-5b586fdfecbe12f3f8e69099d809ca96c7cb978e.zip
cmake: Handle libssh threas library correctly
This should fix the build on Windows and would not install pkg files. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69d01969..445710a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,8 +84,8 @@ add_subdirectory(include)
add_subdirectory(src)
# pkg-config file
+if (UNIX)
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
-configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
@@ -96,6 +96,20 @@ install(
pkgconfig
)
+ if (LIBSSH_THREADS)
+ configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc)
+ install(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
+ ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc
+ DESTINATION
+ ${LIB_INSTALL_DIR}/pkgconfig
+ COMPONENT
+ pkgconfig
+ )
+ endif (LIBSSH_THREADS)
+endif (UNIX)
+
# cmake config files
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})