1464
|
1 cmake_minimum_required(VERSION 2.8.3)
|
|
2
|
|
3 #####################################################################
|
|
4 ## Configuration of the Orthanc framework
|
|
5 #####################################################################
|
|
6
|
|
7 # This CMake file defines the "ORTHANC_STONE_VERSION" macro, so it
|
|
8 # must be the first inclusion
|
|
9 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/Version.cmake)
|
|
10
|
|
11 if (ORTHANC_STONE_VERSION STREQUAL "mainline")
|
|
12 set(ORTHANC_FRAMEWORK_VERSION "mainline")
|
|
13 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
|
|
14 else()
|
|
15 set(ORTHANC_FRAMEWORK_VERSION "1.5.7")
|
|
16 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
|
|
17 endif()
|
|
18
|
|
19 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")")
|
|
20 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
|
|
21 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")
|
|
22
|
|
23
|
|
24 #####################################################################
|
|
25 ## Configuration of the Stone framework
|
|
26 #####################################################################
|
|
27
|
|
28 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneParameters.cmake)
|
|
29 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
|
|
30
|
|
31 DownloadPackage(
|
|
32 "a24b8136b8f3bb93f166baf97d9328de"
|
|
33 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
|
|
34 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
|
|
35
|
|
36 set(ORTHANC_STONE_APPLICATION_RESOURCES
|
|
37 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
|
|
38 )
|
|
39
|
|
40 SET(ENABLE_GOOGLE_TEST OFF)
|
|
41 SET(ENABLE_LOCALE ON)
|
|
42 SET(ENABLE_QT ON)
|
|
43 SET(ENABLE_SDL OFF)
|
|
44 SET(ENABLE_WEB_CLIENT ON)
|
|
45 SET(ORTHANC_SANDBOXED OFF)
|
|
46 LIST(APPEND ORTHANC_BOOST_COMPONENTS program_options)
|
|
47
|
|
48 include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneConfiguration.cmake)
|
|
49
|
|
50 add_definitions(
|
|
51 -DORTHANC_ENABLE_LOGGING_PLUGIN=0
|
|
52 )
|
|
53 #####################################################################
|
|
54 ## Build the samples
|
|
55 #####################################################################
|
|
56
|
|
57 add_library(OrthancStone STATIC
|
|
58 ${ORTHANC_STONE_SOURCES}
|
|
59 )
|
|
60
|
|
61 list(APPEND BASIC_SCENE_APPLICATIONS_SOURCES
|
|
62 BasicSceneWindow.cpp
|
|
63 )
|
|
64
|
|
65 ORTHANC_QT_WRAP_UI(BASIC_SCENE_APPLICATIONS_SOURCES
|
|
66 BasicSceneWindow.ui
|
|
67 )
|
|
68
|
|
69 ORTHANC_QT_WRAP_CPP(BASIC_SCENE_APPLICATIONS_SOURCES
|
|
70 BasicSceneWindow.h
|
|
71 QStoneOpenGlWidget.h
|
|
72 )
|
|
73
|
|
74 add_executable(MpBasicScene
|
|
75 ${CMAKE_CURRENT_LIST_DIR}/../MultiPlatform/BasicScene/BasicScene.h
|
|
76 ${CMAKE_CURRENT_LIST_DIR}/../MultiPlatform/BasicScene/BasicScene.cpp
|
|
77 ${CMAKE_CURRENT_LIST_DIR}/../MultiPlatform/BasicScene/mainQt.cpp
|
|
78 QStoneOpenGlWidget.cpp
|
|
79 ${BASIC_SCENE_APPLICATIONS_SOURCES}
|
|
80 )
|
|
81
|
|
82 target_include_directories(MpBasicScene PUBLIC ${CMAKE_SOURCE_DIR} ${ORTHANC_STONE_ROOT})
|
|
83 target_link_libraries(MpBasicScene OrthancStone)
|