Mercurial > hg > orthanc
comparison Plugins/Samples/ConnectivityChecks/CMakeLists.txt @ 3622:8afc14fab01f
New sample plugin: ConnectivityChecks
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 24 Jan 2020 17:06:23 +0100 |
parents | |
children | a6bfa09df8b3 |
comparison
equal
deleted
inserted
replaced
3620:649489b9bfdb | 3622:8afc14fab01f |
---|---|
1 cmake_minimum_required(VERSION 2.8) | |
2 | |
3 project(ConnectivityChecks) | |
4 | |
5 SET(PLUGIN_NAME "connectivity-checks" CACHE STRING "Name of the plugin") | |
6 SET(PLUGIN_VERSION "mainline" CACHE STRING "Version of the plugin") | |
7 | |
8 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../Resources/CMake/OrthancFrameworkParameters.cmake) | |
9 include(${CMAKE_CURRENT_SOURCE_DIR}/../../../Resources/CMake/OrthancFrameworkConfiguration.cmake) | |
10 | |
11 include(JavaScriptLibraries.cmake) | |
12 | |
13 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
14 execute_process( | |
15 COMMAND | |
16 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | |
17 ${PLUGIN_VERSION} ConnectivityChecks ConnectivityChecks.dll "Orthanc plugin to serve additional folders" | |
18 ERROR_VARIABLE Failure | |
19 OUTPUT_FILE ${AUTOGENERATED_DIR}/ConnectivityChecks.rc | |
20 ) | |
21 | |
22 if (Failure) | |
23 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
24 endif() | |
25 | |
26 list(APPEND ADDITIONAL_RESOURCES ${AUTOGENERATED_DIR}/ConnectivityChecks.rc) | |
27 endif() | |
28 | |
29 EmbedResources( | |
30 WEB_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/WebResources | |
31 LIBRARIES ${JAVASCRIPT_LIBS_DIR} | |
32 ) | |
33 | |
34 add_definitions( | |
35 -DHAS_ORTHANC_EXCEPTION=1 | |
36 -DORTHANC_ENABLE_LOGGING_PLUGIN=1 | |
37 -DORTHANC_PLUGIN_NAME="${PLUGIN_NAME}" | |
38 -DORTHANC_PLUGIN_VERSION="${PLUGIN_VERSION}" | |
39 ) | |
40 | |
41 include_directories( | |
42 ${ORTHANC_ROOT}/Plugins/Include/ | |
43 ) | |
44 | |
45 add_library(OrthancChecks SHARED | |
46 ${ADDITIONAL_RESOURCES} | |
47 ${AUTOGENERATED_SOURCES} | |
48 ${ORTHANC_CORE_SOURCES_DEPENDENCIES} | |
49 ${ORTHANC_ROOT}/Core/Enumerations.cpp | |
50 ${ORTHANC_ROOT}/Core/Logging.cpp | |
51 ${ORTHANC_ROOT}/Core/SystemToolbox.cpp | |
52 ${ORTHANC_ROOT}/Core/Toolbox.cpp | |
53 Plugin.cpp | |
54 ) | |
55 | |
56 set_target_properties( | |
57 OrthancChecks PROPERTIES | |
58 VERSION ${PLUGIN_VERSION} | |
59 SOVERSION ${PLUGIN_VERSION} | |
60 ) |