annotate CMakeLists.txt @ 9:2cb2015b9934 OrthancWebViewer-1.0

revert
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Feb 2015 12:59:40 +0100
parents 49fa9c774465
children dc81c1ad61c7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Department, University Hospital of Liege, Belgium
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 #
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 # This program is free software: you can redistribute it and/or
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 # modify it under the terms of the GNU Affero General Public License
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # as published by the Free Software Foundation, either version 3 of
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # the License, or (at your option) any later version.
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 #
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # This program is distributed in the hope that it will be useful, but
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # Affero General Public License for more details.
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 #
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # You should have received a copy of the GNU Affero General Public License
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 cmake_minimum_required(VERSION 2.8)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 project(OrthancPostgreSQL)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
8
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
23 set(ORTHANC_WEBVIEWER_VERSION "1.0")
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
24
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
25
0
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 # Parameters of the build
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 set(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 SET(STANDALONE_BUILD ON CACHE BOOL "Standalone build (all the resources are embedded, necessary for releases)")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 set(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 # Advanced parameters to fine-tune linking against system libraries
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 set(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of Boost")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 set(USE_SYSTEM_GDCM ON CACHE BOOL "Use the system version of Grassroot DICOM (GDCM)")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 set(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 set(USE_SYSTEM_LIBJPEG ON CACHE BOOL "Use the system version of libjpeg")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 set(USE_SYSTEM_LIBPNG ON CACHE BOOL "Use the system version of libpng")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 set(USE_SYSTEM_ZLIB ON CACHE BOOL "Use the system version of zlib")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 set(USE_SYSTEM_SQLITE ON CACHE BOOL "Use the system version of SQLite")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 # Distribution-specific settings
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 set(USE_GTEST_DEBIAN_SOURCE_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 mark_as_advanced(USE_GTEST_DEBIAN_SOURCE_PACKAGE)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 # Force static build when cross-compiling
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 if (CMAKE_CROSSCOMPILING)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 set(STATIC_BUILD ON)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 set(STANDALONE_BUILD ON)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 SET(OS_LIBRARIES uuid rt dl)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 SET(OS_LIBRARIES rpcrt4 ws2_32 secur32)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 if (CMAKE_COMPILER_IS_GNUCXX)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 endif ()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 if (CMAKE_COMPILER_IS_GNUCXX)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/Resources/VersionScript.map -Wl,--no-undefined")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 include(CheckIncludeFiles)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 include(CheckIncludeFileCXX)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 include(CheckLibraryExists)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 include(${CMAKE_SOURCE_DIR}/Resources/CMake/AutoGeneratedCode.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 include(${CMAKE_SOURCE_DIR}/Resources/CMake/DownloadPackage.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 include(${CMAKE_SOURCE_DIR}/Resources/CMake/BoostConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GdcmConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibJpegConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 include(${CMAKE_SOURCE_DIR}/Resources/CMake/LibPngConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 include(${CMAKE_SOURCE_DIR}/Resources/CMake/JavaScriptLibraries.cmake)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 # Check that the Orthanc SDK headers are available or download them
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 if (STATIC_BUILD)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 set(ORTHANC_SDK_URL "http://orthanc.googlecode.com/hg") # TODO use 0.8.6 release
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 file(MAKE_DIRECTORY ${AUTOGENERATED_DIR}/orthanc)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 file(DOWNLOAD "${ORTHANC_SDK_URL}/Plugins/Include/OrthancCPlugin.h"
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 "${AUTOGENERATED_DIR}/orthanc/OrthancCPlugin.h" SHOW_PROGRESS)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 if (${MSVC})
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 file(DOWNLOAD "${ORTHANC_SDK_URL}/Resources/ThirdParty/VisualStudio/stdint.h"
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 "${AUTOGENERATED_DIR}/stdint.h" SHOW_PROGRESS)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 else ()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 CHECK_INCLUDE_FILE_CXX(orthanc/OrthancCPlugin.h HAVE_ORTHANC_H)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 if (NOT HAVE_ORTHANC_H)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK")
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 if (STANDALONE_BUILD)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 add_definitions(
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 -DORTHANC_STANDALONE=1
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 set(EMBEDDED_RESOURCES
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 WEB_VIEWER ${CMAKE_SOURCE_DIR}/WebApplication
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 else()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 add_definitions(
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 -DORTHANC_STANDALONE=0
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 -DWEB_VIEWER_PATH="${CMAKE_SOURCE_DIR}/WebApplication/"
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 EmbedResources(
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 ORTHANC_EXPLORER ${CMAKE_SOURCE_DIR}/Resources/OrthancExplorer.js
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 JAVASCRIPT_LIBS ${JAVASCRIPT_LIBS_DIR}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 ${EMBEDDED_RESOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 add_definitions(
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 -DORTHANC_SQLITE_STANDALONE=1
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 set(CORE_SOURCES
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 ${BOOST_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 ${JSONCPP_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 ${SQLITE_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 ${LIBJPEG_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 ${ZLIB_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 ${LIBPNG_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 # Sources inherited from Orthanc core
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 ${CMAKE_SOURCE_DIR}/Orthanc/ChunkedBuffer.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 ${CMAKE_SOURCE_DIR}/Orthanc/Enumerations.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 ${CMAKE_SOURCE_DIR}/Orthanc/FileStorage/FilesystemStorage.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 ${CMAKE_SOURCE_DIR}/Orthanc/ImageFormats/ImageAccessor.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 ${CMAKE_SOURCE_DIR}/Orthanc/ImageFormats/ImageBuffer.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 ${CMAKE_SOURCE_DIR}/Orthanc/ImageFormats/ImageProcessing.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 ${CMAKE_SOURCE_DIR}/Orthanc/ImageFormats/PngWriter.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 ${CMAKE_SOURCE_DIR}/Orthanc/MultiThreading/SharedMessageQueue.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${CMAKE_SOURCE_DIR}/Orthanc/OrthancException.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${CMAKE_SOURCE_DIR}/Orthanc/SQLite/Connection.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ${CMAKE_SOURCE_DIR}/Orthanc/SQLite/FunctionContext.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ${CMAKE_SOURCE_DIR}/Orthanc/SQLite/Statement.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ${CMAKE_SOURCE_DIR}/Orthanc/SQLite/StatementId.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 ${CMAKE_SOURCE_DIR}/Orthanc/SQLite/StatementReference.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 ${CMAKE_SOURCE_DIR}/Orthanc/SQLite/Transaction.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 ${CMAKE_SOURCE_DIR}/Orthanc/Toolbox.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 ${CMAKE_SOURCE_DIR}/Orthanc/Uuid.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/base64/base64.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ${CMAKE_SOURCE_DIR}/Plugin/Cache/CacheManager.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 ${CMAKE_SOURCE_DIR}/Plugin/Cache/CacheScheduler.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 ${CMAKE_SOURCE_DIR}/Plugin/JpegWriter.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 ${CMAKE_SOURCE_DIR}/Plugin/ViewerToolbox.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 ${CMAKE_SOURCE_DIR}/Plugin/SeriesVolumeSorter.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 ${CMAKE_SOURCE_DIR}/Plugin/ViewerPrefetchPolicy.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 ${CMAKE_SOURCE_DIR}/Plugin/InstanceInformation.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 ${CMAKE_SOURCE_DIR}/Plugin/InstanceInformationAdapter.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ${CMAKE_SOURCE_DIR}/Plugin/SeriesInformationAdapter.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 add_library(OrthancWebViewer
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 SHARED
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 ${CORE_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 ${AUTOGENERATED_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 ${CMAKE_SOURCE_DIR}/Plugin/Plugin.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 # The following files depend on GDCM
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 ${CMAKE_SOURCE_DIR}/Plugin/ParsedDicomImage.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 ${CMAKE_SOURCE_DIR}/Plugin/DecodedImageAdapter.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 if (STATIC_BUILD OR NOT USE_SYSTEM_GDCM)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 add_dependencies(OrthancWebViewer GDCM)
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 endif()
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 target_link_libraries(OrthancWebViewer ${GDCM_LIBRARIES} ${OS_LIBRARIES})
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184
8
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
185 message("Setting the version of the library to ${ORTHANC_WEBVIEWER_VERSION}")
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
186 set_target_properties(OrthancWebViewer PROPERTIES
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
187 VERSION ${ORTHANC_WEBVIEWER_VERSION}
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
188 SOVERSION ${ORTHANC_WEBVIEWER_VERSION})
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
189
0
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 install(
8
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
191 TARGETS OrthancWebViewer
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
192 RUNTIME DESTINATION lib # Destination for Windows
9
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 8
diff changeset
193 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
8
49fa9c774465 versioning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 7
diff changeset
194 )
0
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 add_executable(UnitTests
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 ${CORE_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 ${GTEST_SOURCES}
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 UnitTestsSources/UnitTestsMain.cpp
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 )
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201
02f7a0400a91 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 target_link_libraries(UnitTests ${OS_LIBRARIES})