comparison Resources/CMake/OrthancStoneConfiguration.cmake @ 274:dc1beee33134 am-2

split SdlApplication into NativeApplication and SdlApplication
author am@osimis.io
date Fri, 24 Aug 2018 13:52:55 +0200
parents 2d64f4d39610
children 5de5699ad570
comparison
equal deleted inserted replaced
273:f21ba2468570 274:dc1beee33134
37 37
38 if (ENABLE_SDL) 38 if (ENABLE_SDL)
39 message(FATAL_ERROR "Cannot enable SDL in sandboxed environments") 39 message(FATAL_ERROR "Cannot enable SDL in sandboxed environments")
40 endif() 40 endif()
41 41
42 if (ENABLE_QT)
43 message(FATAL_ERROR "Cannot enable QT in sandboxed environments")
44 endif()
45
42 if (ENABLE_SSL) 46 if (ENABLE_SSL)
43 message(FATAL_ERROR "Cannot enable SSL in sandboxed environments") 47 message(FATAL_ERROR "Cannot enable SSL in sandboxed environments")
44 endif() 48 endif()
45 endif() 49 endif()
46 50
67 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancHttpConnection.cpp 71 ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancHttpConnection.cpp
68 ) 72 )
69 endif() 73 endif()
70 74
71 75
72 if (ENABLE_SDL) 76 if (ENABLE_SDL AND ENABLE_QT)
77 message("SDL and QT may not be defined together")
78 elseif(ENABLE_SDL)
73 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake) 79 include(${CMAKE_CURRENT_LIST_DIR}/SdlConfiguration.cmake)
80 add_definitions(-DORTHANC_ENABLE_NATIVE=1)
74 add_definitions(-DORTHANC_ENABLE_SDL=1) 81 add_definitions(-DORTHANC_ENABLE_SDL=1)
82 elseif(ENABLE_QT)
83 include(${CMAKE_CURRENT_LIST_DIR}/QtConfiguration.cmake)
84 add_definitions(-DORTHANC_ENABLE_NATIVE=1)
85 add_definitions(-DORTHANC_ENABLE_QT=1)
75 else() 86 else()
76 unset(USE_SYSTEM_SDL CACHE) 87 unset(USE_SYSTEM_SDL CACHE)
77 add_definitions(-DORTHANC_ENABLE_SDL=0) 88 add_definitions(-DORTHANC_ENABLE_SDL=0)
89 add_definitions(-DORTHANC_ENABLE_QT=0)
90 add_definitions(-DORTHANC_ENABLE_NATIVE=0)
78 endif() 91 endif()
79 92
80 93
81 94
82 ##################################################################### 95 #####################################################################
155 ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServicePostCommand.cpp 168 ${ORTHANC_STONE_ROOT}/Platforms/Generic/WebServicePostCommand.cpp
156 ${ORTHANC_STONE_ROOT}/Platforms/Generic/Oracle.cpp 169 ${ORTHANC_STONE_ROOT}/Platforms/Generic/Oracle.cpp
157 ${ORTHANC_STONE_ROOT}/Platforms/Generic/OracleWebService.h 170 ${ORTHANC_STONE_ROOT}/Platforms/Generic/OracleWebService.h
158 ) 171 )
159 172
160 list(APPEND APPLICATIONS_SOURCES 173 if (ENABLE_SDL OR ENABLE_QT)
161 ${ORTHANC_STONE_ROOT}/Applications/Sdl/BasicSdlApplication.cpp 174 list(APPEND APPLICATIONS_SOURCES
162 ${ORTHANC_STONE_ROOT}/Applications/Sdl/BasicSdlApplicationContext.cpp 175 ${ORTHANC_STONE_ROOT}/Applications/Generic/BasicNativeApplication.cpp
163 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlEngine.cpp 176 ${ORTHANC_STONE_ROOT}/Applications/Generic/BasicNativeApplicationContext.cpp
164 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlCairoSurface.cpp 177 )
165 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlOrthancSurface.cpp 178 if (ENABLE_SDL)
166 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlWindow.cpp 179 list(APPEND APPLICATIONS_SOURCES
167 ) 180 ${ORTHANC_STONE_ROOT}/Applications/Sdl/BasicSdlApplication.cpp
181 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlEngine.cpp
182 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlCairoSurface.cpp
183 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlOrthancSurface.cpp
184 ${ORTHANC_STONE_ROOT}/Applications/Sdl/SdlWindow.cpp
185 )
186 endif()
187 endif()
168 else() 188 else()
169 list(APPEND APPLICATIONS_SOURCES 189 list(APPEND APPLICATIONS_SOURCES
170 ${ORTHANC_STONE_ROOT}/Applications/Wasm/StartupParametersBuilder.cpp 190 ${ORTHANC_STONE_ROOT}/Applications/Wasm/StartupParametersBuilder.cpp
171 ) 191 )
172 192