comparison Plugins/Samples/GdcmDecoder/CMakeLists.txt @ 1834:b1a6f49b21dd

GDCM decoder sample
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Nov 2015 12:53:32 +0100
parents
children 7e33516965f8
comparison
equal deleted inserted replaced
1833:47d032c48818 1834:b1a6f49b21dd
1 cmake_minimum_required(VERSION 2.8)
2
3 project(GdcmDecoder)
4
5 SET(GDCM_DECODER_VERSION "0.0" CACHE STRING "Version of the plugin")
6 SET(STATIC_BUILD OFF CACHE BOOL "Static build of the third-party libraries (necessary for Windows)")
7 SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
8 SET(USE_SYSTEM_BOOST ON CACHE BOOL "Use the system version of boost")
9
10 set(SAMPLES_ROOT ${CMAKE_SOURCE_DIR}/..)
11 include(${SAMPLES_ROOT}/Common/OrthancPlugins.cmake)
12 include(${ORTHANC_ROOT}/Resources/CMake/BoostConfiguration.cmake)
13
14 find_package(GDCM REQUIRED)
15 if (GDCM_FOUND)
16 include(${GDCM_USE_FILE})
17 set(GDCM_LIBRARIES gdcmCommon gdcmMSFF)
18 else(GDCM_FOUND)
19 message(FATAL_ERROR "Cannot find GDCM, did you set GDCM_DIR?")
20 endif(GDCM_FOUND)
21
22 add_definitions(-DGDCM_DECODER_VERSION="${GDCM_DECODER_VERSION}")
23
24 add_library(GdcmDecoder SHARED
25 ${BOOST_SOURCES}
26 GdcmDecoderCache.cpp
27 GdcmImageDecoder.cpp
28 OrthancImageWrapper.cpp
29 Plugin.cpp
30 )
31
32 target_link_libraries(GdcmDecoder ${GDCM_LIBRARIES})