Mercurial > hg > orthanc-stl
comparison Resources/CMake/NexusViewer.cmake @ 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 | |
children | 6a891818bad5 |
comparison
equal
deleted
inserted
replaced
63:1fd6d0f8fdc9 | 64:5e11f5880e6d |
---|---|
1 # SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium | |
2 # SPDX-License-Identifier: GPL-3.0-or-later | |
3 | |
4 | |
5 # STL plugin for Orthanc | |
6 # Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium | |
7 # | |
8 # This program is free software: you can redistribute it and/or | |
9 # modify it under the terms of the GNU General Public License as | |
10 # published by the Free Software Foundation, either version 3 of the | |
11 # License, or (at your option) any later version. | |
12 # | |
13 # This program is distributed in the hope that it will be useful, but | |
14 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 # General Public License for more details. | |
17 # | |
18 # You should have received a copy of the GNU General Public License | |
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | |
21 | |
22 DownloadPackage( | |
23 "6069b141edb7ce1d543b53ddaa4b41d1" | |
24 "https://orthanc.uclouvain.be/downloads/third-party-downloads/STL/nexus-4.2.zip" | |
25 "${CMAKE_BINARY_DIR}/nexus-4.2") | |
26 | |
27 set(NEXUS_VIEWER_DIR ${CMAKE_CURRENT_BINARY_DIR}/nexus) | |
28 file(MAKE_DIRECTORY ${NEXUS_VIEWER_DIR}) | |
29 | |
30 DownloadCompressedFile( | |
31 "df21a4a192c0952a1189125609cc76f9" | |
32 "https://orthanc.uclouvain.be/downloads/third-party-downloads/STL/three-84.js.gz" | |
33 "${NEXUS_VIEWER_DIR}/three-84.js") | |
34 | |
35 file(COPY | |
36 ${CMAKE_BINARY_DIR}/nexus-4.2/html/js | |
37 ${CMAKE_BINARY_DIR}/nexus-4.2/html/threejs.html | |
38 DESTINATION | |
39 ${NEXUS_VIEWER_DIR} | |
40 ) | |
41 | |
42 execute_process( | |
43 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i | |
44 ${CMAKE_CURRENT_LIST_DIR}/nexus-viewer-4.2.patch | |
45 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | |
46 RESULT_VARIABLE Failure | |
47 ) | |
48 | |
49 list(APPEND STATIC_ASSETS_PREFIXES "nexus") | |
50 list(APPEND STATIC_ASSETS_CONTENT ${NEXUS_VIEWER_DIR}) |