annotate Samples/Qt/CMakeLists.txt @ 872:733c6db3e5a3 am-dev

limiting the size of the cache
author Alain Mazy <alain@mazy.be>
date Mon, 01 Jul 2019 13:36:51 +0200
parents 23701fbf228e
children 12b591d5d63c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
849
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
1 cmake_minimum_required(VERSION 2.8.3)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
2
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
3 #####################################################################
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
4 ## Configuration of the Orthanc framework
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
5 #####################################################################
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
6
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
7 # This CMake file defines the "ORTHANC_STONE_VERSION" macro, so it
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
8 # must be the first inclusion
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
9 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/Version.cmake)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
10
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
11 if (ORTHANC_STONE_VERSION STREQUAL "mainline")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
12 set(ORTHANC_FRAMEWORK_VERSION "mainline")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
13 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
14 else()
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
15 set(ORTHANC_FRAMEWORK_VERSION "1.5.7")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
16 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
17 endif()
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
18
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
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\")")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
20 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
21 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
22
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
23
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
24 #####################################################################
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
25 ## Configuration of the Stone framework
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
26 #####################################################################
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
27
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
28 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneParameters.cmake)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
29 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
30
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
31 DownloadPackage(
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
32 "a24b8136b8f3bb93f166baf97d9328de"
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
33 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
34 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
35
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
36 set(ORTHANC_STONE_APPLICATION_RESOURCES
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
37 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
38 )
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
39
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
40 SET(ENABLE_GOOGLE_TEST OFF)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
41 SET(ENABLE_LOCALE ON)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
42 SET(ENABLE_QT ON)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
43 SET(ENABLE_SDL OFF)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
44 SET(ENABLE_WEB_CLIENT ON)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
45 SET(ORTHANC_SANDBOXED OFF)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
46 LIST(APPEND ORTHANC_BOOST_COMPONENTS program_options)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
47
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
48 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneConfiguration.cmake)
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
49
863
23701fbf228e first rendering of a 2DScene in Qt widget
Alain Mazy <alain@mazy.be>
parents: 849
diff changeset
50 add_definitions(
23701fbf228e first rendering of a 2DScene in Qt widget
Alain Mazy <alain@mazy.be>
parents: 849
diff changeset
51 -DORTHANC_ENABLE_LOGGING_PLUGIN=0
23701fbf228e first rendering of a 2DScene in Qt widget
Alain Mazy <alain@mazy.be>
parents: 849
diff changeset
52 )
849
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
53 #####################################################################
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
54 ## Build the samples
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
55 #####################################################################
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
56
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
57 add_library(OrthancStone STATIC
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
58 ${ORTHANC_STONE_SOURCES}
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
59 )
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
60
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
61 list(APPEND BASIC_SCENE_APPLICATIONS_SOURCES
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
62 BasicSceneWindow.cpp
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
63 )
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
64
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
65 ORTHANC_QT_WRAP_UI(BASIC_SCENE_APPLICATIONS_SOURCES
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
66 BasicSceneWindow.ui
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
67 )
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
68
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
69 ORTHANC_QT_WRAP_CPP(BASIC_SCENE_APPLICATIONS_SOURCES
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
70 BasicSceneWindow.h
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
71 QStoneOpenGlWidget.h
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
72 )
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
73
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
74 add_executable(BasicScene
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
75 BasicScene.cpp
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
76 QStoneOpenGlWidget.cpp
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
77 ${BASIC_SCENE_APPLICATIONS_SOURCES}
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
78 )
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
79
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
80 target_include_directories(BasicScene PUBLIC ${CMAKE_SOURCE_DIR})
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
81
8a8cf2991538 Qt sample (work in progress)
Alain Mazy <alain@mazy.be>
parents:
diff changeset
82 target_link_libraries(BasicScene OrthancStone)