1
1

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
Этот коммит содержится в:
Andreas Schneider 2009-03-08 12:11:10 +00:00
родитель 814cde9069
Коммит f0b2c39d2f
3 изменённых файлов: 31 добавлений и 8 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -14,5 +14,7 @@ INSTALL(
${libssh_HDRS}
DESTINATION
${INCLUDE_INSTALL_DIR}/${APPLICATION_NAME}
COMPONENT
libraries
)

Просмотреть файл

@ -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
)