Mercurial > hg > orthanc
comparison Plugins/Samples/GdcmDecoding/CMakeLists.txt @ 983:80d4f1618b33 plugins
Sample plugin to replace DCMTK by GDCM when decoding images
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 01 Jul 2014 12:01:58 +0200 |
parents | |
children | e077093bf1a9 |
comparison
equal
deleted
inserted
replaced
982:5983e59ac670 | 983:80d4f1618b33 |
---|---|
1 cmake_minimum_required(VERSION 2.8) | |
2 | |
3 project(GdcmDecoding) | |
4 | |
5 SET(ALLOW_DOWNLOADS ON CACHE BOOL "Allow CMake to download packages") | |
6 SET(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of Boost") | |
7 SET(USE_SYSTEM_GOOGLE_LOG OFF CACHE BOOL "Use the system version of Google Log") | |
8 | |
9 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/../../..) | |
10 | |
11 if (${CMAKE_COMPILER_IS_GNUCXX}) | |
12 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | |
13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") | |
14 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") | |
15 endif() | |
16 | |
17 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake) | |
18 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake) | |
19 include(${ORTHANC_ROOT}/Resources/CMake/GoogleLogConfiguration.cmake) | |
20 | |
21 find_package(GDCM REQUIRED) | |
22 if (GDCM_FOUND) | |
23 include(${GDCM_USE_FILE}) | |
24 set(GDCM_LIBRARIES | |
25 gdcmCommon | |
26 gdcmDICT | |
27 gdcmDSED | |
28 gdcmIOD | |
29 gdcmjpeg12 | |
30 gdcmjpeg16 | |
31 gdcmjpeg8 | |
32 gdcmMEXD | |
33 gdcmMSFF | |
34 ) | |
35 else(GDCM_FOUND) | |
36 message(FATAL_ERROR "Cannot find GDCM, did you set GDCM_DIR?") | |
37 endif(GDCM_FOUND) | |
38 | |
39 | |
40 include_directories( | |
41 ${ORTHANC_ROOT}/Plugins/OrthancCPlugin/ | |
42 ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/Laaw | |
43 ) | |
44 add_library(GdcmDecoding SHARED | |
45 Plugin.cpp | |
46 OrthancContext.cpp | |
47 | |
48 # Sources from Orthanc | |
49 ${GOOGLE_LOG_SOURCES} | |
50 ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp | |
51 ${ORTHANC_ROOT}/Core/Enumerations.cpp | |
52 ${ORTHANC_ROOT}/Core/ImageFormats/ImageAccessor.cpp | |
53 ${ORTHANC_ROOT}/Core/ImageFormats/ImageBuffer.cpp | |
54 ${ORTHANC_ROOT}/Core/ImageFormats/ImageProcessing.cpp | |
55 ${ORTHANC_ROOT}/Core/OrthancException.cpp | |
56 ${ORTHANC_ROOT}/Core/Toolbox.cpp | |
57 ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp | |
58 ${ORTHANC_ROOT}/Resources/ThirdParty/md5/md5.c | |
59 ${THIRD_PARTY_SOURCES} | |
60 ) | |
61 target_link_libraries(GdcmDecoding ${GDCM_LIBRARIES}) | |
62 | |
63 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | |
64 target_link_libraries(GdcmDecoding pthread dl rt) | |
65 endif() |