aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
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 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/threads/CMakeLists.txt9
2 files changed, 8 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4865d765..1012ddf0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -300,6 +300,7 @@ if (WITH_STATIC_LIB)
)
endif (WITH_STATIC_LIB)
+message(STATUS "Threads_FOUND=${Threads_FOUND}")
if (Threads_FOUND)
add_subdirectory(threads)
endif (Threads_FOUND)
diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt
index a32d601e..2ab4e1ba 100644
--- a/src/threads/CMakeLists.txt
+++ b/src/threads/CMakeLists.txt
@@ -27,8 +27,9 @@ set(LIBSSH_THREADS_LINK_LIBRARIES
${LIBSSH_SHARED_LIBRARY}
)
-set(libssh_threads_SRCS
-)
+message(STATUS "threads library: Threads_FOUND=${Threads_FOUND}")
+
+set(libssh_threads_SRCS) # empty SRC
# build and link pthread
if (CMAKE_USE_PTHREADS_INIT)
@@ -41,6 +42,8 @@ if (CMAKE_USE_PTHREADS_INIT)
${LIBSSH_THREADS_LINK_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
+
+ message(STATUS "libssh_threads_SRCS=${libssh_threads_SRCS}")
endif (CMAKE_USE_PTHREADS_INIT)
set(LIBSSH_THREADS_LINK_LIBRARIES
@@ -54,6 +57,8 @@ include_directories(
)
if (libssh_threads_SRCS)
+ set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL)
+
add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})