Mercurial > hg > orthanc
annotate Plugins/Samples/ServeFolders/CMakeLists.txt @ 1371:f528849ee9f7 query-retrieve
DICOM Query/Retrieve available from Orthanc Explorer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 27 May 2015 17:33:13 +0200 |
parents | a761deb85729 |
children | 92da9e1c2daa |
rev | line source |
---|---|
1322
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 cmake_minimum_required(VERSION 2.8) |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 project(ServeFolders) |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 |
1323
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
5 set(ALLOW_DOWNLOADS ON) |
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
6 set(USE_SYSTEM_JSONCPP OFF) |
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
7 include(../../../Resources/CMake/DownloadPackage.cmake) |
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
8 include(../../../Resources/CMake/JsonCppConfiguration.cmake) |
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
9 |
1322
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 link_libraries(uuid) |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread") |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread") |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 link_libraries(rpcrt4 ws2_32 secur32) |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 if (CMAKE_COMPILER_IS_GNUCXX) |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++") |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 endif() |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 endif () |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 if (CMAKE_COMPILER_IS_GNUCXX) |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/VersionScript.map -Wl,--no-undefined") |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 endif() |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 include_directories(${CMAKE_SOURCE_DIR}/../../Include/) |
1325 | 26 add_library(ServeFolders SHARED |
1323
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
27 Plugin.cpp |
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
28 ${THIRD_PARTY_SOURCES} |
5a92665dee23
Sample plugin: Serve folders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1322
diff
changeset
|
29 ) |
1322
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 # Linking with "pthread" is necessary, otherwise the software crashes |
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 # http://sourceware.org/bugzilla/show_bug.cgi?id=10652#c17 |
1325 | 34 target_link_libraries(ServeFolders dl rt) |
1322
f497a72d9f71
fixes to the sample plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 endif() |