comparison CMakeLists.txt @ 291:4d7469f72a0b

embedding of dicom dictionaries
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Dec 2012 15:15:48 +0100
parents ffd98d2f0b91
children b79b9343ff89
comparison
equal deleted inserted replaced
290:b3322636b06d 291:4d7469f72a0b
41 if (${CMAKE_CROSSCOMPILING}) 41 if (${CMAKE_CROSSCOMPILING})
42 # Cross-compilation implies the standalone build 42 # Cross-compilation implies the standalone build
43 SET(STANDALONE_BUILD ON) 43 SET(STANDALONE_BUILD ON)
44 endif() 44 endif()
45 45
46 if (${STANDALONE_BUILD})
47 # We embed all the resources in the binaries for standalone builds
48 add_definitions(-DORTHANC_STANDALONE=1)
49 EmbedResources(
50 PREPARE_DATABASE OrthancServer/PrepareDatabase.sql
51 ORTHANC_EXPLORER OrthancExplorer
52 CONFIGURATION_SAMPLE Resources/Configuration.json
53 )
54 else()
55 add_definitions(
56 -DORTHANC_STANDALONE=0
57 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\"
58 )
59 EmbedResources(
60 PREPARE_DATABASE OrthancServer/PrepareDatabase.sql
61 CONFIGURATION_SAMPLE Resources/Configuration.json
62 )
63 endif()
64
65
66 # Prepare the third-party dependencies 46 # Prepare the third-party dependencies
67 SET(THIRD_PARTY_SOURCES 47 SET(THIRD_PARTY_SOURCES
68 ${CMAKE_SOURCE_DIR}/Resources/md5/md5.c 48 ${CMAKE_SOURCE_DIR}/Resources/md5/md5.c
69 ${CMAKE_SOURCE_DIR}/Resources/base64/base64.cpp 49 ${CMAKE_SOURCE_DIR}/Resources/base64/base64.cpp
70 ${CMAKE_SOURCE_DIR}/Resources/sha1/sha1.cpp 50 ${CMAKE_SOURCE_DIR}/Resources/sha1/sha1.cpp
89 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) 69 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
90 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake) 70 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
91 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake) 71 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
92 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake) 72 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake)
93 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibPngConfiguration.cmake) 73 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibPngConfiguration.cmake)
74
75
76 # Prepare the embedded files
77 set(EMBEDDED_FILES
78 PREPARE_DATABASE ${CMAKE_CURRENT_SOURCE_DIR}/OrthancServer/PrepareDatabase.sql
79 CONFIGURATION_SAMPLE ${CMAKE_CURRENT_SOURCE_DIR}/Resources/Configuration.json
80 )
81
82 if (${STANDALONE_BUILD})
83 # We embed all the resources in the binaries for standalone builds
84 add_definitions(-DORTHANC_STANDALONE=1)
85 EmbedResources(
86 ${EMBEDDED_FILES}
87 ORTHANC_EXPLORER ${CMAKE_CURRENT_SOURCE_DIR}/OrthancExplorer
88 ${DCMTK_DICTIONARIES}
89 )
90 else()
91 add_definitions(
92 -DORTHANC_STANDALONE=0
93 -DORTHANC_PATH=\"${CMAKE_SOURCE_DIR}\"
94 )
95 EmbedResources(
96 ${EMBEDDED_FILES}
97 )
98 endif()
99
94 100
95 101
96 # The main instructions to build the Orthanc binaries 102 # The main instructions to build the Orthanc binaries
97 add_library(CoreLibrary 103 add_library(CoreLibrary
98 STATIC 104 STATIC