annotate Samples/Sdl/CMakeLists.txt @ 644:f939f449482c

Ongoing tracker work.
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 10 May 2019 16:15:55 +0200
parents b0652595b62a
children 1e9ed656318e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
600
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8.3)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 #####################################################################
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 ## Configuration of the Orthanc framework
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 #####################################################################
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # This CMake file defines the "ORTHANC_STONE_VERSION" macro, so it
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # must be the first inclusion
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/Version.cmake)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 if (ORTHANC_STONE_VERSION STREQUAL "mainline")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 set(ORTHANC_FRAMEWORK_VERSION "mainline")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 else()
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 set(ORTHANC_FRAMEWORK_VERSION "1.5.7")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 endif()
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #####################################################################
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 ## Configuration of the Stone framework
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #####################################################################
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneParameters.cmake)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 DownloadPackage(
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 "a24b8136b8f3bb93f166baf97d9328de"
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 set(ORTHANC_STONE_APPLICATION_RESOURCES
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 )
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
632
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
40 SET(ENABLE_SDL_CONSOLE OFF CACHE BOOL "Enable the use of the MIT-licensed SDL_Console")
600
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 SET(ENABLE_GOOGLE_TEST OFF)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 SET(ENABLE_LOCALE ON)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 SET(ENABLE_SDL ON)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 SET(ENABLE_WEB_CLIENT ON)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 SET(ORTHANC_SANDBOXED OFF)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 LIST(APPEND ORTHANC_BOOST_COMPONENTS program_options)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneConfiguration.cmake)
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 #####################################################################
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 ## Build the samples
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 #####################################################################
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 add_library(OrthancStone STATIC
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 ${ORTHANC_STONE_SOURCES}
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 )
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 add_executable(BasicScene
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 BasicScene.cpp
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 )
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
6129b1e5ba42 BasicScene SDL sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 target_link_libraries(BasicScene OrthancStone)
619
9cd19b28f011 test: refactoring oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
63
632
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
64 if(ENABLE_SDL_CONSOLE)
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
65 add_definitions(
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
66 -DENABLE_SDL_CONSOLE=1
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
67 )
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
68 LIST(APPEND TRACKERSAMPLE_SOURCE "../../../SDL-Console/SDL_Console.c")
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
69 LIST(APPEND TRACKERSAMPLE_SOURCE "../../../SDL-Console/SDL_Console.h")
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
70 endif()
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
71
644
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
72 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateAngleMeasureTracker.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
73 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateAngleMeasureTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
74 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateCircleMeasureTracker.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
75 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateCircleMeasureTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
76 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateLineMeasureTracker.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
77 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateLineMeasureTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
78
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
79 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateMeasureTracker.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
80 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateMeasureTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
81
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
82 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateSimpleTrackerAdapter.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
83
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
84 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditAngleMeasureTracker.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
85 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditAngleMeasureTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
86 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditCircleMeasureTracker.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
87 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditCircleMeasureTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
88 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditLineMeasureTracker.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
89 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditLineMeasureTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
90
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
91 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/IFlexiblePointerTracker.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
92
632
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
93 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureCommands.cpp")
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
94 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureCommands.h")
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
95 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTools.cpp")
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
96 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTools.h")
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
97 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTrackers.cpp")
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
98 LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTrackers.h")
644
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
99
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
100
632
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
101 LIST(APPEND TRACKERSAMPLE_SOURCE "TrackerSample.cpp")
644
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
102 LIST(APPEND TRACKERSAMPLE_SOURCE "TrackerSampleApp.cpp")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
103 LIST(APPEND TRACKERSAMPLE_SOURCE "TrackerSampleApp.h")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
104
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
105 if (MSVC AND MSVC_VERSION GREATER 1700)
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
106 LIST(APPEND TRACKERSAMPLE_SOURCE "cpp.hint")
f939f449482c Ongoing tracker work.
Benjamin Golinvaux <bgo@osimis.io>
parents: 633
diff changeset
107 endif()
632
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
108
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
109 add_executable(TrackerSample
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
110 ${TRACKERSAMPLE_SOURCE}
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
111 )
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
112
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
113 target_link_libraries(TrackerSample OrthancStone)
500c3f70b6c2 - Added a ClearAllChains method to PolylineSceneLayer --> revision must change
Benjamin Golinvaux <bgo@osimis.io>
parents: 616
diff changeset
114
619
9cd19b28f011 test: refactoring oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
115 add_executable(Loader
9cd19b28f011 test: refactoring oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
116 Loader.cpp
9cd19b28f011 test: refactoring oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
117 )
9cd19b28f011 test: refactoring oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
118
9cd19b28f011 test: refactoring oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 616
diff changeset
119 target_link_libraries(Loader OrthancStone)