comparison CMakeLists.txt @ 64:5e11f5880e6d

simplified the embedding of Nexus viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 15 Jun 2024 16:35:21 +0200
parents b798387b085c
children 88e98907b140
comparison
equal deleted inserted replaced
63:1fd6d0f8fdc9 64:5e11f5880e6d
196 196
197 list(APPEND STATIC_ASSETS_PREFIXES "basic-viewer") 197 list(APPEND STATIC_ASSETS_PREFIXES "basic-viewer")
198 list(APPEND STATIC_ASSETS_CONTENT "${CMAKE_SOURCE_DIR}/JavaScriptLibraries/dist-three") 198 list(APPEND STATIC_ASSETS_CONTENT "${CMAKE_SOURCE_DIR}/JavaScriptLibraries/dist-three")
199 199
200 if (ENABLE_NEXUS) 200 if (ENABLE_NEXUS)
201 set(NEXUS_ASSETS_DIR ${AUTOGENERATED_DIR}/nexus) 201 include(${CMAKE_SOURCE_DIR}/Resources/CMake/NexusViewer.cmake)
202 file(MAKE_DIRECTORY ${NEXUS_ASSETS_DIR})
203
204 DownloadCompressedFile(
205 "df21a4a192c0952a1189125609cc76f9"
206 "https://orthanc.uclouvain.be/downloads/third-party-downloads/STL/three-84.js.gz"
207 "${NEXUS_ASSETS_DIR}/three-84.js")
208 202
209 list(APPEND STATIC_ASSETS_PREFIXES "nexus") 203 list(APPEND STATIC_ASSETS_PREFIXES "nexus")
210 list(APPEND STATIC_ASSETS_CONTENT 204 list(APPEND STATIC_ASSETS_CONTENT ${NEXUS_VIEWER_DIR})
211 ${NEXUS_ASSETS_DIR} # This adds "three-84.js" that is needed by the Nexus viewer
212 )
213
214 list(APPEND EMBEDDED_RESOURCES
215 NEXUS_HTML ${CMAKE_SOURCE_DIR}/Resources/Nexus/threejs.html
216 NEXUS_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/nexus.js
217 NEXUS_MECO_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/meco.js
218 NEXUS_THREE_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/nexus_three.js
219 NEXUS_TRACKBALL_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/TrackballControls.js
220 )
221 205
222 add_definitions(-DORTHANC_ENABLE_NEXUS=1) 206 add_definitions(-DORTHANC_ENABLE_NEXUS=1)
223 207
224 if (ENABLE_3DHOP) 208 if (ENABLE_3DHOP)
225 include(${CMAKE_SOURCE_DIR}/Resources/CMake/3DHOP.cmake) 209 include(${CMAKE_SOURCE_DIR}/Resources/CMake/3DHOP.cmake)