comparison CMakeLists.txt @ 277:58f969933720

merge with Orthanc-0.3.1
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 09 Dec 2012 15:03:17 +0100
parents f1fb9d1aa444 3b3525dee661
children e5402c368b21 915ed24547ea
comparison
equal deleted inserted replaced
276:8af8754a7a8e 277:58f969933720
18 SET(USE_DYNAMIC_GOOGLE_LOG ON CACHE BOOL "Use the dynamic version of Google Log") 18 SET(USE_DYNAMIC_GOOGLE_LOG ON CACHE BOOL "Use the dynamic version of Google Log")
19 SET(USE_DYNAMIC_GOOGLE_TEST ON CACHE BOOL "Use the dynamic version of Google Test (not for Debian sid)") 19 SET(USE_DYNAMIC_GOOGLE_TEST ON CACHE BOOL "Use the dynamic version of Google Test (not for Debian sid)")
20 SET(USE_DYNAMIC_SQLITE ON CACHE BOOL "Use the dynamic version of SQLite") 20 SET(USE_DYNAMIC_SQLITE ON CACHE BOOL "Use the dynamic version of SQLite")
21 SET(DEBIAN_FORCE_HARDENING OFF CACHE BOOL "Force the injection of Debian hardening flags (unrecommended)") 21 SET(DEBIAN_FORCE_HARDENING OFF CACHE BOOL "Force the injection of Debian hardening flags (unrecommended)")
22 SET(DEBIAN_USE_GTEST_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (only for Debian sid)") 22 SET(DEBIAN_USE_GTEST_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (only for Debian sid)")
23 SET(ONLY_CORE_LIBRARY OFF CACHE BOOL "Only build the core library")
23 24
24 mark_as_advanced(USE_DYNAMIC_JSONCPP) 25 mark_as_advanced(USE_DYNAMIC_JSONCPP)
25 mark_as_advanced(USE_DYNAMIC_GOOGLE_LOG) 26 mark_as_advanced(USE_DYNAMIC_GOOGLE_LOG)
26 mark_as_advanced(USE_DYNAMIC_GOOGLE_TEST) 27 mark_as_advanced(USE_DYNAMIC_GOOGLE_TEST)
27 mark_as_advanced(USE_DYNAMIC_SQLITE) 28 mark_as_advanced(USE_DYNAMIC_SQLITE)
28 mark_as_advanced(DEBIAN_FORCE_HARDENING) 29 mark_as_advanced(DEBIAN_FORCE_HARDENING)
29 mark_as_advanced(DEBIAN_USE_STATIC_GOOGLE_TEST) 30 mark_as_advanced(DEBIAN_USE_STATIC_GOOGLE_TEST)
31 mark_as_advanced(ONLY_CORE_LIBRARY)
30 32
31 # Some basic inclusions 33 # Some basic inclusions
32 include(CheckIncludeFiles) 34 include(CheckIncludeFiles)
33 include(CheckIncludeFileCXX) 35 include(CheckIncludeFileCXX)
34 include(${CMAKE_SOURCE_DIR}/Resources/CMake/AutoGeneratedCode.cmake) 36 include(${CMAKE_SOURCE_DIR}/Resources/CMake/AutoGeneratedCode.cmake)
76 else() 78 else()
77 add_definitions(-DORTHANC_SSL_ENABLED=0) 79 add_definitions(-DORTHANC_SSL_ENABLED=0)
78 endif() 80 endif()
79 81
80 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake) 82 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
81 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake) 83
84 if(NOT ONLY_CORE_LIBRARY)
85 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
86 endif()
87
82 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake) 88 include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
83 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake) 89 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
84 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake) 90 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
85 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake) 91 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
86 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake) 92 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibCurlConfiguration.cmake)
131 137
132 OrthancCppClient/HttpClient.cpp 138 OrthancCppClient/HttpClient.cpp
133 OrthancCppClient/HttpException.cpp 139 OrthancCppClient/HttpException.cpp
134 ) 140 )
135 141
136 add_library(ServerLibrary 142
137 OrthancServer/DicomProtocol/DicomFindAnswers.cpp 143
138 OrthancServer/DicomProtocol/DicomServer.cpp 144 if(NOT ONLY_CORE_LIBRARY)
139 OrthancServer/DicomProtocol/DicomUserConnection.cpp 145 add_library(ServerLibrary
140 OrthancServer/FromDcmtkBridge.cpp 146 ${DCMTK_SOURCES}
141 OrthancServer/Internals/CommandDispatcher.cpp 147 OrthancServer/DicomProtocol/DicomFindAnswers.cpp
142 OrthancServer/Internals/FindScp.cpp 148 OrthancServer/DicomProtocol/DicomServer.cpp
143 OrthancServer/Internals/MoveScp.cpp 149 OrthancServer/DicomProtocol/DicomUserConnection.cpp
144 OrthancServer/Internals/StoreScp.cpp 150 OrthancServer/FromDcmtkBridge.cpp
145 OrthancServer/OrthancInitialization.cpp 151 OrthancServer/Internals/CommandDispatcher.cpp
146 OrthancServer/OrthancRestApi.cpp 152 OrthancServer/Internals/FindScp.cpp
147 OrthancServer/ServerIndex.cpp 153 OrthancServer/Internals/MoveScp.cpp
148 OrthancServer/ToDcmtkBridge.cpp 154 OrthancServer/Internals/StoreScp.cpp
149 OrthancServer/DatabaseWrapper.cpp 155 OrthancServer/OrthancInitialization.cpp
150 OrthancServer/ServerContext.cpp 156 OrthancServer/OrthancRestApi.cpp
151 OrthancServer/ServerEnumerations.cpp 157 OrthancServer/ServerIndex.cpp
152 OrthancServer/ServerToolbox.cpp 158 OrthancServer/ToDcmtkBridge.cpp
153 ) 159 OrthancServer/DatabaseWrapper.cpp
154 160 OrthancServer/ServerContext.cpp
155 # Ensure autogenerated code is built before building ServerLibrary 161 OrthancServer/ServerEnumerations.cpp
156 add_dependencies(ServerLibrary CoreLibrary) 162 OrthancServer/ServerToolbox.cpp
157 163 )
158 add_executable(Orthanc 164
159 OrthancServer/main.cpp 165 # Ensure autogenerated code is built before building ServerLibrary
160 ) 166 add_dependencies(ServerLibrary CoreLibrary)
161 167
162 target_link_libraries(Orthanc ServerLibrary CoreLibrary) 168 add_executable(Orthanc
163 169 OrthancServer/main.cpp
164 install( 170 )
165 TARGETS Orthanc 171
166 RUNTIME DESTINATION bin 172 target_link_libraries(Orthanc ServerLibrary CoreLibrary)
167 ) 173
168 174 install(
169 175 TARGETS Orthanc
170 # Build the unit tests if required 176 RUNTIME DESTINATION bin
171 if (BUILD_UNIT_TESTS) 177 )
172 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake) 178
173 add_executable(UnitTests 179 # Build the unit tests if required
174 ${GTEST_SOURCES} 180 if (BUILD_UNIT_TESTS)
175 UnitTests/MessageWithDestination.cpp 181 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
176 UnitTests/RestApi.cpp 182 add_executable(UnitTests
177 UnitTests/SQLite.cpp 183 ${GTEST_SOURCES}
178 UnitTests/SQLiteChromium.cpp 184 UnitTests/MessageWithDestination.cpp
179 UnitTests/ServerIndex.cpp 185 UnitTests/RestApi.cpp
180 UnitTests/Versions.cpp 186 UnitTests/SQLite.cpp
181 UnitTests/Zip.cpp 187 UnitTests/SQLiteChromium.cpp
182 UnitTests/FileStorage.cpp 188 UnitTests/ServerIndex.cpp
183 UnitTests/main.cpp 189 UnitTests/Versions.cpp
184 ) 190 UnitTests/Zip.cpp
185 target_link_libraries(UnitTests ServerLibrary CoreLibrary) 191 UnitTests/FileStorage.cpp
192 UnitTests/main.cpp
193 )
194 target_link_libraries(UnitTests ServerLibrary CoreLibrary)
195 endif()
186 endif() 196 endif()
187 197
188 198
189 # Generate the Doxygen documentation if Doxygen is present 199 # Generate the Doxygen documentation if Doxygen is present
190 find_package(Doxygen) 200 find_package(Doxygen)