Mercurial > hg > orthanc-stl
diff 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 |
line wrap: on
line diff
--- a/CMakeLists.txt Sat Jun 15 16:17:41 2024 +0200 +++ b/CMakeLists.txt Sat Jun 15 16:35:21 2024 +0200 @@ -198,26 +198,10 @@ list(APPEND STATIC_ASSETS_CONTENT "${CMAKE_SOURCE_DIR}/JavaScriptLibraries/dist-three") if (ENABLE_NEXUS) - set(NEXUS_ASSETS_DIR ${AUTOGENERATED_DIR}/nexus) - file(MAKE_DIRECTORY ${NEXUS_ASSETS_DIR}) - - DownloadCompressedFile( - "df21a4a192c0952a1189125609cc76f9" - "https://orthanc.uclouvain.be/downloads/third-party-downloads/STL/three-84.js.gz" - "${NEXUS_ASSETS_DIR}/three-84.js") + include(${CMAKE_SOURCE_DIR}/Resources/CMake/NexusViewer.cmake) list(APPEND STATIC_ASSETS_PREFIXES "nexus") - list(APPEND STATIC_ASSETS_CONTENT - ${NEXUS_ASSETS_DIR} # This adds "three-84.js" that is needed by the Nexus viewer - ) - - list(APPEND EMBEDDED_RESOURCES - NEXUS_HTML ${CMAKE_SOURCE_DIR}/Resources/Nexus/threejs.html - NEXUS_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/nexus.js - NEXUS_MECO_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/meco.js - NEXUS_THREE_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/nexus_three.js - NEXUS_TRACKBALL_JS ${CMAKE_SOURCE_DIR}/Resources/Nexus/js/TrackballControls.js - ) + list(APPEND STATIC_ASSETS_CONTENT ${NEXUS_VIEWER_DIR}) add_definitions(-DORTHANC_ENABLE_NEXUS=1)