comparison Applications/Samples/Sdl/RtViewer/CMakeLists.txt @ 1538:d1806b4e4839

moving OrthancStone/Samples/ as Applications/Samples/
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Aug 2020 13:24:38 +0200
parents OrthancStone/Samples/Sdl/RtViewer/CMakeLists.txt@244ad1e4e76a
children
comparison
equal deleted inserted replaced
1537:de8cf5859e84 1538:d1806b4e4839
1 cmake_minimum_required(VERSION 2.8.10)
2
3 project(RtViewerSdl)
4
5 include(${CMAKE_SOURCE_DIR}/../../../Resources/CMake/OrthancStoneParameters.cmake)
6
7 if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
8 set(ORTHANC_BOOST_COMPONENTS program_options)
9
10 set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
11 set(USE_GOOGLE_TEST_DEBIAN_PACKAGE OFF CACHE BOOL "Use the sources of Google Test shipped with libgtest-dev (Debian only)")
12 mark_as_advanced(USE_GOOGLE_TEST_DEBIAN_PACKAGE)
13 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/DownloadPackage.cmake)
14 include(${ORTHANC_STONE_ROOT}/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake)
15
16 else()
17 set(ENABLE_GOOGLE_TEST ON)
18 set(ENABLE_LOCALE ON) # Necessary for text rendering
19 set(ENABLE_OPENGL ON) # <==
20 set(ENABLE_WEB_CLIENT ON)
21 endif()
22
23 set(ENABLE_DCMTK ON) # <==
24 set(ENABLE_SDL ON)
25
26 include(${ORTHANC_STONE_ROOT}/Resources/CMake/OrthancStoneConfiguration.cmake)
27 include(${CMAKE_SOURCE_DIR}/../Utilities.cmake)
28
29 if (NOT ORTHANC_FRAMEWORK_SOURCE STREQUAL "system")
30 # This include must be after "OrthancStoneConfiguration.cmake" to
31 # have "BOOST_SOURCES_DIR" defined
32 include(${CMAKE_SOURCE_DIR}/../BoostExtendedConfiguration.cmake)
33 endif()
34
35 DownloadPackage(
36 "a24b8136b8f3bb93f166baf97d9328de"
37 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
38 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
39
40 EmbedResources(
41 COLORMAP_HOT ${ORTHANC_STONE_ROOT}/Resources/Colormaps/hot.lut
42 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
43 )
44
45 SortFilesInSourceGroups()
46
47 add_executable(RtViewerSdl
48 RtViewerSdl.cpp
49 ../SdlHelpers.h
50 ../../Common/RtViewerApp.cpp
51 ../../Common/RtViewerApp.h
52 ../../Common/RtViewerView.cpp
53 ../../Common/RtViewerView.h
54 ../../Common/SampleHelpers.h
55 ${ORTHANC_STONE_SOURCES}
56 ${AUTOGENERATED_SOURCES}
57 ${BOOST_EXTENDED_SOURCES}
58 )
59
60 target_link_libraries(RtViewerSdl ${DCMTK_LIBRARIES})