comparison CMakeLists.txt @ 39:56c9b700a0db

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Aug 2020 14:19:27 +0200
parents 92b93845d84b
children 16cf7c2eb806
comparison
equal deleted inserted replaced
38:789a6e960ae2 39:56c9b700a0db
28 28
29 29
30 # Download and setup the Orthanc framework 30 # Download and setup the Orthanc framework
31 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake) 31 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake)
32 32
33 include_directories(${ORTHANC_FRAMEWORK_ROOT})
34
33 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") 35 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
34 link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES}) 36 link_libraries(${ORTHANC_FRAMEWORK_LIBRARIES})
35 37
36 set(USE_SYSTEM_CURL ON CACHE BOOL "Use the system version of LibCurl") 38 set(USE_SYSTEM_CURL ON CACHE BOOL "Use the system version of LibCurl")
37 set(USE_SYSTEM_OPENSSL ON CACHE BOOL "Use the system version of OpenSSL") 39 set(USE_SYSTEM_OPENSSL ON CACHE BOOL "Use the system version of OpenSSL")
40 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/OpenSslConfiguration.cmake) 42 include(${CMAKE_SOURCE_DIR}/Resources/Orthanc/CMake/OpenSslConfiguration.cmake)
41 43
42 else() 44 else()
43 set(OPENSSL_STATIC_VERSION "1.0.2" CACHE STRING "TODO - Upgrade to OpenSSL 1.1.1" FORCE) 45 set(OPENSSL_STATIC_VERSION "1.0.2" CACHE STRING "TODO - Upgrade to OpenSSL 1.1.1" FORCE)
44 46
45 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake) 47 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkParameters.cmake)
46 48
47 set(ENABLE_CRYPTO_OPTIONS ON) 49 set(ENABLE_CRYPTO_OPTIONS ON)
48 set(ENABLE_ZLIB ON) 50 set(ENABLE_ZLIB ON)
49 set(ENABLE_WEB_CLIENT ON) 51 set(ENABLE_WEB_CLIENT ON)
50 set(ENABLE_OPENSSL_ENGINES ON) # Necessary on Windows 52 set(ENABLE_OPENSSL_ENGINES ON) # Necessary on Windows
51 53
52 include(${ORTHANC_FRAMEWORK_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake) 54 include(${ORTHANC_FRAMEWORK_ROOT}/../Resources/CMake/OrthancFrameworkConfiguration.cmake)
53 include_directories(${ORTHANC_FRAMEWORK_ROOT}/Sources)
54 endif() 55 endif()
55 56
56 57
57 include(${CMAKE_SOURCE_DIR}/Resources/CMake/CRC32C.cmake) 58 include(${CMAKE_SOURCE_DIR}/Resources/CMake/CRC32C.cmake)
58 include(${CMAKE_SOURCE_DIR}/Resources/CMake/NlohmannJson.cmake) 59 include(${CMAKE_SOURCE_DIR}/Resources/CMake/NlohmannJson.cmake)
87 ) 88 )
88 89
89 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 90 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
90 execute_process( 91 execute_process(
91 COMMAND 92 COMMAND
92 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/Resources/WindowsResources.py 93 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py
93 ${GCP_PLUGIN_VERSION} "Google Cloud Platform plugin" OrthancGoogleCloudPlatform.dll 94 ${GCP_PLUGIN_VERSION} "Google Cloud Platform plugin" OrthancGoogleCloudPlatform.dll
94 "Plugin to access Google Cloud Platform from Orthanc" 95 "Plugin to access Google Cloud Platform from Orthanc"
95 ERROR_VARIABLE Failure 96 ERROR_VARIABLE Failure
96 OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/Version.rc 97 OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/Version.rc
97 ) 98 )
107 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") 108 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
108 # Redefine the list of Orthanc sources, removing unused items, in 109 # Redefine the list of Orthanc sources, removing unused items, in
109 # order to reduce the number of files and speed up the builds 110 # order to reduce the number of files and speed up the builds
110 set(ORTHANC_CORE_SOURCES 111 set(ORTHANC_CORE_SOURCES
111 ${ORTHANC_CORE_SOURCES_DEPENDENCIES} 112 ${ORTHANC_CORE_SOURCES_DEPENDENCIES}
112 ${ORTHANC_FRAMEWORK_ROOT}/Sources/ChunkedBuffer.cpp 113 ${ORTHANC_FRAMEWORK_ROOT}/ChunkedBuffer.cpp
113 ${ORTHANC_FRAMEWORK_ROOT}/Sources/Enumerations.cpp 114 ${ORTHANC_FRAMEWORK_ROOT}/Enumerations.cpp
114 ${ORTHANC_FRAMEWORK_ROOT}/Sources/HttpClient.cpp 115 ${ORTHANC_FRAMEWORK_ROOT}/HttpClient.cpp
115 ${ORTHANC_FRAMEWORK_ROOT}/Sources/Logging.cpp 116 ${ORTHANC_FRAMEWORK_ROOT}/Logging.cpp
116 ${ORTHANC_FRAMEWORK_ROOT}/Sources/SystemToolbox.cpp 117 ${ORTHANC_FRAMEWORK_ROOT}/SystemToolbox.cpp
117 ${ORTHANC_FRAMEWORK_ROOT}/Sources/Toolbox.cpp 118 ${ORTHANC_FRAMEWORK_ROOT}/Toolbox.cpp
118 ) 119 )
119 endif() 120 endif()
120 121
121 add_library(OrthancGoogleCloudPlatform SHARED 122 add_library(OrthancGoogleCloudPlatform SHARED
122 ${GCP_RESOURCES} 123 ${GCP_RESOURCES}