comparison CMakeLists.txt @ 520:cd7d4842851c laaw

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jul 2013 16:36:24 +0200
parents 49a1228d6fe7
children 81cb140941a5
comparison
equal deleted inserted replaced
518:58841db7b64e 520:cd7d4842851c
126 126
127 ##################################################################### 127 #####################################################################
128 ## Build the core of Orthanc 128 ## Build the core of Orthanc
129 ##################################################################### 129 #####################################################################
130 130
131 add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) 131 list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH)
132 if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
133 add_library(OpenSSL STATIC ${OPENSSL_SOURCES})
134 endif()
132 135
133 add_library(CoreLibrary 136 add_library(CoreLibrary
134 STATIC 137 STATIC
135 ${AUTOGENERATED_SOURCES} 138 ${AUTOGENERATED_SOURCES}
136 ${THIRD_PARTY_SOURCES} 139 ${THIRD_PARTY_SOURCES}
221 224
222 add_executable(Orthanc 225 add_executable(Orthanc
223 OrthancServer/main.cpp 226 OrthancServer/main.cpp
224 ) 227 )
225 228
226 target_link_libraries(Orthanc ServerLibrary CoreLibrary OpenSSL) 229 target_link_libraries(Orthanc ServerLibrary CoreLibrary)
230
231 if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
232 target_link_libraries(Orthanc OpenSSL)
233 endif()
227 234
228 install( 235 install(
229 TARGETS Orthanc 236 TARGETS Orthanc
230 RUNTIME DESTINATION bin 237 RUNTIME DESTINATION bin
231 ) 238 )
250 UnitTests/Versions.cpp 257 UnitTests/Versions.cpp
251 UnitTests/Zip.cpp 258 UnitTests/Zip.cpp
252 UnitTests/Lua.cpp 259 UnitTests/Lua.cpp
253 UnitTests/main.cpp 260 UnitTests/main.cpp
254 ) 261 )
255 target_link_libraries(UnitTests ServerLibrary CoreLibrary OpenSSL) 262 target_link_libraries(UnitTests ServerLibrary CoreLibrary)
263
264 if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
265 target_link_libraries(UnitTests OpenSSL)
266 endif()
267
256 endif() 268 endif()
257 endif() 269 endif()
258 270
259 271
260 ##################################################################### 272 #####################################################################