aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-03-08 12:11:10 +0000
committerAndreas Schneider <mail@cynapses.org>2009-03-08 12:11:10 +0000
commitf0b2c39d2fecfa989cd6c455f2736fb914db80ec (patch)
tree28d67a415a533868e8b9eb3ae428abe84aef6666
parent814cde90699691d73605dc2604f431dd454852c2 (diff)
downloadlibssh-f0b2c39d2fecfa989cd6c455f2736fb914db80ec.tar.gz
libssh-f0b2c39d2fecfa989cd6c455f2736fb914db80ec.tar.xz
libssh-f0b2c39d2fecfa989cd6c455f2736fb914db80ec.zip
Fix crypto/gcrypt detection and prepare for cross compilation.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@245 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r--CMakeLists.txt8
-rw-r--r--include/libssh/CMakeLists.txt2
-rw-r--r--libssh/CMakeLists.txt29
3 files changed, 31 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a8af3b7..59422478 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,12 +40,12 @@ find_package(ZLIB REQUIRED)
find_package(OpenSSL)
-if (NOT CRYPTO_FOUND)
+if (NOT CRYPTO_LIBRARY)
find_package(GCrypt)
- if (NOT GCRYPT_FOUND)
+ if (NOT GCRYPT_LIBRARY)
message(FATAL_ERROR "Could not find OpenSSL or GCrypt")
- endif (NOT GCRYPT_FOUND)
-endif (NOT CRYPTO_FOUND)
+ endif (NOT GCRYPT_LIBRARY)
+endif (NOT CRYPTO_LIBRARY)
# config.h checks
include(ConfigureChecks.cmake)
diff --git a/include/libssh/CMakeLists.txt b/include/libssh/CMakeLists.txt
index 3e1c3d50..05605106 100644
--- a/include/libssh/CMakeLists.txt
+++ b/include/libssh/CMakeLists.txt
@@ -14,5 +14,7 @@ INSTALL(
${libssh_HDRS}
DESTINATION
${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
+ COMPONENT
+ libraries
)
diff --git a/libssh/CMakeLists.txt b/libssh/CMakeLists.txt
index a3e5e210..62bf4b92 100644
--- a/libssh/CMakeLists.txt
+++ b/libssh/CMakeLists.txt
@@ -9,8 +9,6 @@ set(LIBSSH_PUBLIC_INCLUDE_DIRS
set(LIBSSH_PRIVATE_INCLUDE_DIRS
${CMAKE_BINARY_DIR}
- ${OPENSSL_INCLUDE_DIRS}
- ${GCRYPT_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
)
@@ -21,11 +19,32 @@ set(LIBSSH_LIBRARY
set(LIBSSH_LINK_LIBRARIES
${LIBSSH_LIBRARY}
- ${CRYPTO_LIBRARY}
- ${GCRYPT_LIBRARY}
${ZLIB_LIBRARIES}
)
+if (CRYPTO_LIBRARY)
+ set(LIBSSH_PRIVATE_INCLUDE_DIRS
+ ${LIBSSH_PRIVATE_INCLUDE_DIRS}
+ ${OPENSSL_INCLUDE_DIRS}
+ )
+ set(LIBSSH_LINK_LIBRARIES
+ ${LIBSSH_LINK_LIBRARIES}
+ ${CRYPTO_LIBRARY}
+ )
+endif (CRYPTO_LIBRARY)
+
+if (GCRYPT_LIBRARY)
+ set(LIBSSH_PRIVATE_INCLUDE_DIRS
+ ${LIBSSH_PRIVATE_INCLUDE_DIRS}
+ ${GCRYPT_INCLUDE_DIRS}
+ )
+ set(LIBSSH_LINK_LIBRARIES
+ ${LIBSSH_LINK_LIBRARIES}
+ ${GCRYPT_LIBRARY}
+ )
+endif (GCRYPT_LIBRARY)
+
+
set(libssh_SRCS
agent.c
auth1.c
@@ -87,5 +106,7 @@ install(
${LIBSSH_LIBRARY}
DESTINATION
${LIB_INSTALL_DIR}
+ COMPONENT
+ libraries
)