Mercurial > hg > orthanc
comparison CMakeLists.txt @ 2392:a88c3ea0c96d
getting rid of the OpenSSL static library
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 30 Aug 2017 13:11:37 +0200 |
parents | 233d6eeef799 |
children | 807ddffc0eeb |
comparison
equal
deleted
inserted
replaced
2391:233d6eeef799 | 2392:a88c3ea0c96d |
---|---|
270 | 270 |
271 ##################################################################### | 271 ##################################################################### |
272 ## Build the core of Orthanc | 272 ## Build the core of Orthanc |
273 ##################################################################### | 273 ##################################################################### |
274 | 274 |
275 list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH) | |
276 if (${OPENSSL_SOURCES_LENGTH} GREATER 0) | |
277 add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) | |
278 endif() | |
279 | |
280 | |
281 # "CoreLibrary" contains all the third-party dependencies and the | 275 # "CoreLibrary" contains all the third-party dependencies and the |
282 # content of the "Core" folder, but not OpenSSL, nor DCMTK. | 276 # content of the "Core" folder |
283 add_library(CoreLibrary | 277 add_library(CoreLibrary |
284 STATIC | 278 STATIC |
285 ${ORTHANC_CORE_PCH} | 279 ${ORTHANC_CORE_PCH} |
286 ${ORTHANC_CORE_SOURCES} | 280 ${ORTHANC_CORE_SOURCES} |
281 ${ORTHANC_DICOM_SOURCES} | |
287 ${AUTOGENERATED_SOURCES} | 282 ${AUTOGENERATED_SOURCES} |
288 ) | 283 ) |
289 | 284 |
290 | 285 |
291 ##################################################################### | 286 ##################################################################### |
292 ## Build the Orthanc server | 287 ## Build the Orthanc server |
293 ##################################################################### | 288 ##################################################################### |
294 | 289 |
295 # "ServerLibrary" contains DCMTK | |
296 add_library(ServerLibrary | 290 add_library(ServerLibrary |
297 STATIC | 291 STATIC |
298 ${ORTHANC_SERVER_PCH} | 292 ${ORTHANC_SERVER_PCH} |
299 ${ORTHANC_SERVER_SOURCES} | 293 ${ORTHANC_SERVER_SOURCES} |
300 ${ORTHANC_DICOM_SOURCES} | 294 ) |
301 ) | |
302 | |
303 # Ensure autogenerated code is built before building ServerLibrary | |
304 add_dependencies(ServerLibrary CoreLibrary) | |
305 | 295 |
306 add_executable(Orthanc | 296 add_executable(Orthanc |
307 OrthancServer/main.cpp | 297 OrthancServer/main.cpp |
308 ${ORTHANC_RESOURCES} | 298 ${ORTHANC_RESOURCES} |
309 ) | 299 ) |
310 | 300 |
311 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) | 301 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) |
312 | 302 |
313 if (${OPENSSL_SOURCES_LENGTH} GREATER 0) | |
314 target_link_libraries(Orthanc OpenSSL) | |
315 endif() | |
316 | |
317 install( | 303 install( |
318 TARGETS Orthanc | 304 TARGETS Orthanc |
319 RUNTIME DESTINATION sbin | 305 RUNTIME DESTINATION sbin |
320 ) | 306 ) |
321 | |
322 | 307 |
323 | 308 |
324 ##################################################################### | 309 ##################################################################### |
325 ## Build the unit tests | 310 ## Build the unit tests |
326 ##################################################################### | 311 ##################################################################### |
330 ${ORTHANC_UNIT_TESTS_PCH} | 315 ${ORTHANC_UNIT_TESTS_PCH} |
331 ${ORTHANC_UNIT_TESTS_SOURCES} | 316 ${ORTHANC_UNIT_TESTS_SOURCES} |
332 ) | 317 ) |
333 | 318 |
334 target_link_libraries(UnitTests ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) | 319 target_link_libraries(UnitTests ServerLibrary CoreLibrary ${DCMTK_LIBRARIES}) |
335 | |
336 if (${OPENSSL_SOURCES_LENGTH} GREATER 0) | |
337 target_link_libraries(UnitTests OpenSSL) | |
338 endif() | |
339 | 320 |
340 | 321 |
341 | 322 |
342 ##################################################################### | 323 ##################################################################### |
343 ## Build the "ServeFolders" plugin | 324 ## Build the "ServeFolders" plugin |