diff 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
line wrap: on
line diff
--- a/CMakeLists.txt	Wed Aug 30 12:29:48 2017 +0200
+++ b/CMakeLists.txt	Wed Aug 30 13:11:37 2017 +0200
@@ -272,18 +272,13 @@
 ## Build the core of Orthanc
 #####################################################################
 
-list(LENGTH OPENSSL_SOURCES OPENSSL_SOURCES_LENGTH)
-if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
-  add_library(OpenSSL STATIC ${OPENSSL_SOURCES})
-endif()
-
-
 # "CoreLibrary" contains all the third-party dependencies and the
-# content of the "Core" folder, but not OpenSSL, nor DCMTK.
+# content of the "Core" folder
 add_library(CoreLibrary
   STATIC
   ${ORTHANC_CORE_PCH}
   ${ORTHANC_CORE_SOURCES}
+  ${ORTHANC_DICOM_SOURCES}
   ${AUTOGENERATED_SOURCES}
   )  
 
@@ -292,17 +287,12 @@
 ## Build the Orthanc server
 #####################################################################
 
-# "ServerLibrary" contains DCMTK
 add_library(ServerLibrary
   STATIC
   ${ORTHANC_SERVER_PCH}
   ${ORTHANC_SERVER_SOURCES}
-  ${ORTHANC_DICOM_SOURCES}
   )
 
-# Ensure autogenerated code is built before building ServerLibrary
-add_dependencies(ServerLibrary CoreLibrary)
-
 add_executable(Orthanc
   OrthancServer/main.cpp
   ${ORTHANC_RESOURCES}
@@ -310,17 +300,12 @@
 
 target_link_libraries(Orthanc ServerLibrary CoreLibrary ${DCMTK_LIBRARIES})
 
-if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
-  target_link_libraries(Orthanc OpenSSL)
-endif()
-
 install(
   TARGETS Orthanc
   RUNTIME DESTINATION sbin
   )
 
 
-
 #####################################################################
 ## Build the unit tests
 #####################################################################
@@ -333,10 +318,6 @@
 
 target_link_libraries(UnitTests ServerLibrary CoreLibrary ${DCMTK_LIBRARIES})
 
-if (${OPENSSL_SOURCES_LENGTH} GREATER 0)
-  target_link_libraries(UnitTests OpenSSL)
-endif()
-
 
 
 #####################################################################