aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1e8aefb1..f03cf5df 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -8,25 +8,10 @@ set(LIBSSH_PUBLIC_INCLUDE_DIRS
set(LIBSSH_PRIVATE_INCLUDE_DIRS
${CMAKE_BINARY_DIR}
${OPENSSL_INCLUDE_DIRS}
- ${GCRYPT_INCLUDE_DIRS}
- ${ZLIB_INCLUDE_DIRS}
)
-set(LIBSSH_SHARED_LIBRARY
- ssh_shared
- CACHE INTERNAL "libssh shared library"
-)
-
-if (WITH_STATIC_LIB)
- set(LIBSSH_STATIC_LIBRARY
- ssh_static
- CACHE INTERNAL "libssh static library"
- )
-endif (WITH_STATIC_LIB)
-
set(LIBSSH_LINK_LIBRARIES
${LIBSSH_REQUIRED_LIBRARIES}
- ${ZLIB_LIBRARIES}
)
if (WIN32)
@@ -67,11 +52,35 @@ if (GCRYPT_LIBRARY)
)
endif (GCRYPT_LIBRARY)
+if (WITH_ZLIB)
+ set(LIBSSH_PRIVATE_INCLUDE_DIRS
+ ${LIBSSH_PRIVATE_INCLUDE_DIRS}
+ ${ZLIB_INCLUDE_DIRS}
+ )
+
+ set(LIBSSH_LINK_LIBRARIES
+ ${LIBSSH_LINK_LIBRARIES}
+ ${ZLIB_LIBRARY}
+ )
+endif (WITH_ZLIB)
+
set(LIBSSH_LINK_LIBRARIES
${LIBSSH_LINK_LIBRARIES}
CACHE INTERNAL "libssh link libraries"
)
+set(LIBSSH_SHARED_LIBRARY
+ ssh_shared
+ CACHE INTERNAL "libssh shared library"
+)
+
+if (WITH_STATIC_LIB)
+ set(LIBSSH_STATIC_LIBRARY
+ ssh_static
+ CACHE INTERNAL "libssh static library"
+ )
+endif (WITH_STATIC_LIB)
+
set(libssh_SRCS
agent.c
auth.c