annotate Plugins/Samples/GdcmDecoding/CMakeLists.txt @ 1212:79f868a7f972

NEWS
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Nov 2014 13:58:26 +0100
parents e077093bf1a9
children f497a72d9f71
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
983
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 project(GdcmDecoding)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 SET(ALLOW_DOWNLOADS ON CACHE BOOL "Allow CMake to download packages")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 SET(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of Boost")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 SET(USE_SYSTEM_GOOGLE_LOG OFF CACHE BOOL "Use the system version of Google Log")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 set(ORTHANC_ROOT ${CMAKE_SOURCE_DIR}/../../..)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 if (${CMAKE_COMPILER_IS_GNUCXX})
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 endif()
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 include(${ORTHANC_ROOT}/Resources/CMake/GoogleLogConfiguration.cmake)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 find_package(GDCM REQUIRED)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 if (GDCM_FOUND)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 include(${GDCM_USE_FILE})
984
e077093bf1a9 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
24 set(GDCM_LIBRARIES gdcmCommon gdcmMSFF)
983
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 else(GDCM_FOUND)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 message(FATAL_ERROR "Cannot find GDCM, did you set GDCM_DIR?")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 endif(GDCM_FOUND)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 include_directories(
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 ${ORTHANC_ROOT}/Plugins/OrthancCPlugin/
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 ${ORTHANC_ROOT}/OrthancCppClient/SharedLibrary/Laaw
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 )
984
e077093bf1a9 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
33
983
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 add_library(GdcmDecoding SHARED
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 Plugin.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 OrthancContext.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 # Sources from Orthanc
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 ${GOOGLE_LOG_SOURCES}
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 ${ORTHANC_ROOT}/Core/ChunkedBuffer.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 ${ORTHANC_ROOT}/Core/Enumerations.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ${ORTHANC_ROOT}/Core/ImageFormats/ImageAccessor.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 ${ORTHANC_ROOT}/Core/ImageFormats/ImageBuffer.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 ${ORTHANC_ROOT}/Core/ImageFormats/ImageProcessing.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 ${ORTHANC_ROOT}/Core/OrthancException.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ${ORTHANC_ROOT}/Core/Toolbox.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ${ORTHANC_ROOT}/Resources/ThirdParty/base64/base64.cpp
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ${ORTHANC_ROOT}/Resources/ThirdParty/md5/md5.c
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 ${THIRD_PARTY_SOURCES}
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 )
984
e077093bf1a9 improvements
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
51
983
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 target_link_libraries(GdcmDecoding ${GDCM_LIBRARIES})
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 target_link_libraries(GdcmDecoding pthread dl rt)
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 endif()