comparison CMakeLists.txt @ 1414:0a67a502c90f

fixes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 Jun 2015 21:14:05 +0200
parents 98fa856b4f8f
children 97268448bdfc
comparison
equal deleted inserted replaced
1413:98fa856b4f8f 1414:0a67a502c90f
221 221
222 ##################################################################### 222 #####################################################################
223 ## Inclusion of third-party dependencies 223 ## Inclusion of third-party dependencies
224 ##################################################################### 224 #####################################################################
225 225
226 # Configuration of the standalone builds
227 if (CMAKE_CROSSCOMPILING)
228 # Cross-compilation implies the standalone build
229 SET(STANDALONE_BUILD ON)
230 endif()
231
232 # Prepare the third-party dependencies
233 SET(THIRD_PARTY_SOURCES
234 ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/md5/md5.c
235 ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/base64/base64.cpp
236 )
237
238 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleLogConfiguration.cmake) 226 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleLogConfiguration.cmake)
239 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) 227 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
240 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake) 228 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
241 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake) 229 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
242 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) 230 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
246 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LuaConfiguration.cmake) 234 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LuaConfiguration.cmake)
247 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake) 235 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake)
248 include(${CMAKE_SOURCE_DIR}/Resources/CMake/PugixmlConfiguration.cmake) 236 include(${CMAKE_SOURCE_DIR}/Resources/CMake/PugixmlConfiguration.cmake)
249 237
250 238
251 if (${ENABLE_SSL}) 239 if (ENABLE_SSL)
252 add_definitions(-DORTHANC_SSL_ENABLED=1) 240 add_definitions(-DORTHANC_SSL_ENABLED=1)
253 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake) 241 include(${CMAKE_SOURCE_DIR}/Resources/CMake/OpenSslConfiguration.cmake)
254 else() 242 else()
255 add_definitions(-DORTHANC_SSL_ENABLED=0) 243 add_definitions(-DORTHANC_SSL_ENABLED=0)
256 endif() 244 endif()
273 261
274 ##################################################################### 262 #####################################################################
275 ## Autogeneration of files 263 ## Autogeneration of files
276 ##################################################################### 264 #####################################################################
277 265
278 if (${STANDALONE_BUILD}) 266 if (STANDALONE_BUILD)
279 # We embed all the resources in the binaries for standalone builds 267 # We embed all the resources in the binaries for standalone builds
280 add_definitions(-DORTHANC_STANDALONE=1) 268 add_definitions(-DORTHANC_STANDALONE=1)
281 EmbedResources( 269 EmbedResources(
282 ${ORTHANC_EMBEDDED_FILES} 270 ${ORTHANC_EMBEDDED_FILES}
283 ORTHANC_EXPLORER ${CMAKE_CURRENT_SOURCE_DIR}/OrthancExplorer 271 ORTHANC_EXPLORER ${CMAKE_CURRENT_SOURCE_DIR}/OrthancExplorer
298 ##################################################################### 286 #####################################################################
299 ## Build the core of Orthanc 287 ## Build the core of Orthanc
300 ##################################################################### 288 #####################################################################
301 289
302 # Setup precompiled headers for Microsoft Visual Studio 290 # Setup precompiled headers for Microsoft Visual Studio
303 if (${MSVC}) 291 if (MSVC)
304 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1) 292 add_definitions(-DORTHANC_USE_PRECOMPILED_HEADERS=1)
305 293
306 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS( 294 ADD_VISUAL_STUDIO_PRECOMPILED_HEADERS(
307 "PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_CORE_SOURCES) 295 "PrecompiledHeaders.h" "Core/PrecompiledHeaders.cpp" ORTHANC_CORE_SOURCES)
308 296
324 add_library(OpenSSL STATIC ${OPENSSL_SOURCES}) 312 add_library(OpenSSL STATIC ${OPENSSL_SOURCES})
325 endif() 313 endif()
326 314
327 add_library(CoreLibrary 315 add_library(CoreLibrary
328 STATIC 316 STATIC
317 ${ORTHANC_CORE_SOURCES}
329 ${AUTOGENERATED_SOURCES} 318 ${AUTOGENERATED_SOURCES}
330 ${THIRD_PARTY_SOURCES} 319
331 ${CURL_SOURCES} 320 ${CURL_SOURCES}
332 ${ORTHANC_CORE_SOURCES} 321 ${ZLIB_SOURCES}
322 ${MONGOOSE_SOURCES}
323 ${JSONCPP_SOURCES}
324 ${BOOST_SOURCES}
325 ${SQLITE_SOURCES}
326 ${LIBPNG_SOURCES}
327 ${PUGIXML_SOURCES}
328
329 ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/md5/md5.c
330 ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/base64/base64.cpp
333 ) 331 )
332
334 333
335 334
336 ##################################################################### 335 #####################################################################
337 ## Build the Orthanc server 336 ## Build the Orthanc server
338 ##################################################################### 337 #####################################################################
396 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) 395 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include)
397 396
398 add_library( 397 add_library(
399 ServeFolders SHARED 398 ServeFolders SHARED
400 Plugins/Samples/ServeFolders/Plugin.cpp 399 Plugins/Samples/ServeFolders/Plugin.cpp
401 ${THIRD_PARTY_SOURCES} 400 ${JSONCPP_SOURCES}
402 ) 401 )
403 402
404 set_target_properties( 403 set_target_properties(
405 ServeFolders PROPERTIES 404 ServeFolders PROPERTIES
406 VERSION ${ORTHANC_VERSION} 405 VERSION ${ORTHANC_VERSION}