Mercurial > hg > orthanc
changeset 520:cd7d4842851c laaw
fix build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 19 Jul 2013 16:36:24 +0200 |
parents | 58841db7b64e |
children | 81cb140941a5 |
files | CMakeLists.txt |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Fri Jul 19 16:14:18 2013 +0200 +++ b/CMakeLists.txt Fri Jul 19 16:36:24 2013 +0200 @@ -128,7 +128,10 @@ ## Build the core of Orthanc ##################################################################### -add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) +list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH) +if (${OPENSSL_SOURCES_LENGTH} GREATER 0) + add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) +endif() add_library(CoreLibrary STATIC @@ -223,7 +226,11 @@ OrthancServer/main.cpp ) - target_link_libraries(Orthanc ServerLibrary CoreLibrary OpenSSL) + target_link_libraries(Orthanc ServerLibrary CoreLibrary) + + if (${OPENSSL_SOURCES_LENGTH} GREATER 0) + target_link_libraries(Orthanc OpenSSL) + endif() install( TARGETS Orthanc @@ -252,7 +259,12 @@ UnitTests/Lua.cpp UnitTests/main.cpp ) - target_link_libraries(UnitTests ServerLibrary CoreLibrary OpenSSL) + target_link_libraries(UnitTests ServerLibrary CoreLibrary) + + if (${OPENSSL_SOURCES_LENGTH} GREATER 0) + target_link_libraries(UnitTests OpenSSL) + endif() + endif() endif()