diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-03-08 12:11:10 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-03-08 12:11:10 +0000 |
commit | f0b2c39d2fecfa989cd6c455f2736fb914db80ec (patch) | |
tree | 28d67a415a533868e8b9eb3ae428abe84aef6666 /libssh | |
parent | 814cde90699691d73605dc2604f431dd454852c2 (diff) | |
download | libssh-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
Diffstat (limited to 'libssh')
-rw-r--r-- | libssh/CMakeLists.txt | 29 |
1 files changed, 25 insertions, 4 deletions
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 ) |