aboutsummaryrefslogtreecommitdiff
path: root/ports/libssh/only-one-flavor-threads.patch
blob: 31b3e1f36de563fb372de7ada04ce201afc27e39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt
index 2ab4e1b..a47620b 100644
--- a/src/threads/CMakeLists.txt
+++ b/src/threads/CMakeLists.txt
@@ -59,6 +59,7 @@ include_directories(
 if (libssh_threads_SRCS)
     set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL)
 
+    if (NOT WITH_STATIC_LIB)
     add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
 
     target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})
@@ -89,7 +90,7 @@ if (libssh_threads_SRCS)
       COMPONENT libraries
     )
 
-    if (WITH_STATIC_LIB)
+    else (WITH_STATIC_LIB)
       add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS})
 
       if (MSVC)