changeset 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
files CMakeLists.txt Resources/CMake/OrthancFrameworkConfiguration.cmake
diffstat 2 files changed, 11 insertions(+), 22 deletions(-) [+]
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()
-
 
 
 #####################################################################
--- a/Resources/CMake/OrthancFrameworkConfiguration.cmake	Wed Aug 30 12:29:48 2017 +0200
+++ b/Resources/CMake/OrthancFrameworkConfiguration.cmake	Wed Aug 30 13:11:37 2017 +0200
@@ -116,7 +116,7 @@
       include(${CMAKE_CURRENT_LIST_DIR}/LibP11Configuration.cmake)
 
       add_definitions(-DORTHANC_ENABLE_PKCS11=1)
-      list(APPEND ORTHANC_CORE_SOURCES
+      list(APPEND ORTHANC_CORE_SOURCES_INTERNAL
         ${ORTHANC_ROOT}/Core/Pkcs11.cpp
         )
     else()
@@ -400,6 +400,14 @@
 ## Gathering of all the source code
 #####################################################################
 
+# The "xxx_INTERNAL" variables list the source code that belongs to
+# the Orthanc project. It can be used to configure precompiled headers
+# if using Microsoft Visual Studio.
+
+# The "xxx_DEPENDENCIES" variables list the source code coming from
+# third-party dependencies.
+
+
 set(ORTHANC_CORE_SOURCES_DEPENDENCIES
   ${BOOST_SOURCES}
   ${CIVETWEB_SOURCES}