annotate OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt @ 5675:2b65f25cb1c8 find-refactoring

more debug output
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 06 Jul 2024 15:00:45 +0200
parents f7adfb22e20e
children
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
5640
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
4 # Copyright (C) 2017-2023 Osimis S.A., Belgium
f7adfb22e20e updated copyright, as Orthanc Team now replaces Osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5485
diff changeset
5 # Copyright (C) 2024-2024 Orthanc Team SRL, Belgium
5485
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5357
diff changeset
6 # Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
4123
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
7 #
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
8 # 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
9 # 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
10 # 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
11 # 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
12 #
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
13 # 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
14 # 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
15 # 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
16 # General Public License for more details.
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
17 #
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
18 # 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
19 # 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
20
3d6ee570cfb2 adding missing licenses to sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4099
diff changeset
21
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 cmake_minimum_required(VERSION 2.8)
4171
822d3a17d797 better fix for CMP0058
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4123
diff changeset
23 cmake_policy(SET CMP0058 NEW)
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 project(ConnectivityChecks)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 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
28 SET(PLUGIN_VERSION "mainline" CACHE STRING "Version of the plugin")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
30 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../OrthancFramework/Resources/CMake/OrthancFrameworkParameters.cmake)
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
31 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
32
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 include(JavaScriptLibraries.cmake)
4099
bf1a17f12306 moving version scripts from OrthancFramework to OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4050
diff changeset
34 include(${CMAKE_CURRENT_LIST_DIR}/../Common/OrthancPluginsExports.cmake)
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 execute_process(
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 COMMAND
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
39 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Resources/WindowsResources.py
5024
c2ebc47f4f18 wip: adding DelayedDeletion plugin
Alain Mazy <am@osimis.io>
parents: 4870
diff changeset
40 ${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
41 ERROR_VARIABLE Failure
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 OUTPUT_FILE ${AUTOGENERATED_DIR}/ConnectivityChecks.rc
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
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 if (Failure)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 list(APPEND ADDITIONAL_RESOURCES ${AUTOGENERATED_DIR}/ConnectivityChecks.rc)
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 endif()
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 EmbedResources(
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
53 --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
54 --target=ConnectivityChecksResources
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 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
56 LIBRARIES ${CONNECTIVITY_CHECKS_JAVASCRIPT_DIR}
3622
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
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 add_definitions(
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 -DHAS_ORTHANC_EXCEPTION=1
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 -DORTHANC_PLUGIN_NAME="${PLUGIN_NAME}"
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 -DORTHANC_PLUGIN_VERSION="${PLUGIN_VERSION}"
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
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 include_directories(
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
66 ${CMAKE_SOURCE_DIR}/../../Include/
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 )
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
3624
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3623
diff changeset
69 add_library(ConnectivityChecks SHARED
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 ${ADDITIONAL_RESOURCES}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 ${AUTOGENERATED_SOURCES}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 ${ORTHANC_CORE_SOURCES_DEPENDENCIES}
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
73 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Enumerations.cpp
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
74 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Logging.cpp
4305
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4171
diff changeset
75 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/OrthancException.cpp
4050
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
76 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/SystemToolbox.cpp
cd363608551a fix paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
77 ${CMAKE_SOURCE_DIR}/../../../../OrthancFramework/Sources/Toolbox.cpp
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 Plugin.cpp
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
5357
fddb5d8d0021 Prevent the leak of the full path of the source files in the binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5257
diff changeset
81 DefineSourceBasenameForTarget(ConnectivityChecks)
fddb5d8d0021 Prevent the leak of the full path of the source files in the binaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5257
diff changeset
82
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 set_target_properties(
3624
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3623
diff changeset
84 ConnectivityChecks PROPERTIES
3622
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 VERSION ${PLUGIN_VERSION}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 SOVERSION ${PLUGIN_VERSION}
8afc14fab01f New sample plugin: ConnectivityChecks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 )
3623
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
88
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
89 install(
3624
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3623
diff changeset
90 TARGETS ConnectivityChecks
3623
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
91 DESTINATION .
a6bfa09df8b3 fix for cis
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3622
diff changeset
92 )