comparison OrthancServer/Plugins/Samples/ConnectivityChecks/CMakeLists.txt @ 4044:d25f4c0fa160 framework

splitting code into OrthancFramework and OrthancServer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 10 Jun 2020 20:30:34 +0200
parents Plugins/Samples/ConnectivityChecks/CMakeLists.txt@5e26d004838c
children 05b8fd21089c
comparison
equal deleted inserted replaced
4043:6c6239aec462 4044:d25f4c0fa160
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 --framework-path=${CMAKE_CURRENT_SOURCE_DIR}/../../../Core
31 WEB_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/WebResources
32 LIBRARIES ${JAVASCRIPT_LIBS_DIR}
33 )
34
35 add_definitions(
36 -DHAS_ORTHANC_EXCEPTION=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(ConnectivityChecks 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 ConnectivityChecks PROPERTIES
58 VERSION ${PLUGIN_VERSION}
59 SOVERSION ${PLUGIN_VERSION}
60 )
61
62 install(
63 TARGETS ConnectivityChecks
64 DESTINATION .
65 )