annotate OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt @ 5293:ef6d4e794401

ParseJson: try integers before doubles
author Alain Mazy <am@osimis.io>
date Wed, 10 May 2023 11:54:59 +0200
parents 0b183bb77c83
children fddb5d8d0021
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4123
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
3 # Department, University Hospital of Liege, Belgium
5185
0ea402b4d901 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5024
diff changeset
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium
0ea402b4d901 upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5024
diff changeset
5 # Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4123
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
6 #
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
7 # This program is free software: you can redistribute it and/or
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
8 # modify it under the terms of the GNU General Public License as
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
9 # published by the Free Software Foundation, either version 3 of the
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
10 # License, or (at your option) any later version.
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
11 #
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
12 # This program is distributed in the hope that it will be useful, but
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
15 # General Public License for more details.
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
16 #
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
17 # You should have received a copy of the GNU General Public License
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
19
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
20
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 cmake_minimum_required(VERSION 2.8)
4171
822d3a17d797 better fix for CMP0058
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4123
diff changeset
22 cmake_policy(SET CMP0058 NEW)
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 project(ConnectivityChecks)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 SET(PLUGIN_NAME "connectivity-checks" CACHE STRING "Name of the plugin")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 SET(PLUGIN_VERSION "mainline" CACHE STRING "Version of the plugin")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
29 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake)
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
30 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake)
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 include(JavaScriptLibraries.cmake)
4099
bf1a17f12306 moving version scripts from OrthancFramework to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4050
diff changeset
33 include(${CMAKE_CURRENT_LIST_DIR}/../Common/OrthancPluginsExports.cmake)
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 execute_process(
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 COMMAND
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
38 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/WindowsResources.py
5024
c2ebc47f4f18 wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents: 4870
diff changeset
39 ${PLUGIN_VERSION} ConnectivityChecks ConnectivityChecks.dll "Orthanc plugin to show connectivity status"
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 ERROR_VARIABLE Failure
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 OUTPUT_FILE ${AUTOGENERATED_DIR}/ConnectivityChecks.rc
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 if (Failure)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 list(APPEND ADDITIONAL_RESOURCES ${AUTOGENERATED_DIR}/ConnectivityChecks.rc)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 EmbedResources(
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
52 --framework-path=${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources
5257
0b183bb77c83 Avoid the use of "externalproject_add()" to build the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
53 --target=ConnectivityChecksResources
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 WEB_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/WebResources
5257
0b183bb77c83 Avoid the use of "externalproject_add()" to build the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
55 LIBRARIES ${CONNECTIVITY_CHECKS_JAVASCRIPT_DIR}
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 add_definitions(
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 -DHAS_ORTHANC_EXCEPTION=1
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 -DORTHANC_PLUGIN_NAME="${PLUGIN_NAME}"
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 -DORTHANC_PLUGIN_VERSION="${PLUGIN_VERSION}"
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 include_directories(
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
65 ${CMAKE_SOURCE_DIR}/../../Include/
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
3624
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3623
diff changeset
68 add_library(ConnectivityChecks SHARED
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 ${ADDITIONAL_RESOURCES}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 ${AUTOGENERATED_SOURCES}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 ${ORTHANC_CORE_SOURCES_DEPENDENCIES}
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
72 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Enumerations.cpp
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
73 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Logging.cpp
4305
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4171
diff changeset
74 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/OrthancException.cpp
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
75 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SystemToolbox.cpp
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
76 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Toolbox.cpp
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 Plugin.cpp
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 set_target_properties(
3624
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3623
diff changeset
81 ConnectivityChecks PROPERTIES
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 VERSION ${PLUGIN_VERSION}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 SOVERSION ${PLUGIN_VERSION}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 )
3623
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
85
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
86 install(
3624
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3623
diff changeset
87 TARGETS ConnectivityChecks
3623
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
88 DESTINATION .
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
89 )