Mercurial > hg > orthanc-stone
comparison Samples/Qt/CMakeLists.txt @ 849:8a8cf2991538 am-dev
Qt sample (work in progress)
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 17 Jun 2019 15:04:47 +0200 |
parents | |
children | 23701fbf228e |
comparison
equal
deleted
inserted
replaced
838:997290c7d537 | 849:8a8cf2991538 |
---|---|
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 ##################################################################### | |
51 ## Build the samples | |
52 ##################################################################### | |
53 | |
54 add_library(OrthancStone STATIC | |
55 ${ORTHANC_STONE_SOURCES} | |
56 ) | |
57 | |
58 list(APPEND BASIC_SCENE_APPLICATIONS_SOURCES | |
59 BasicSceneWindow.cpp | |
60 ) | |
61 | |
62 ORTHANC_QT_WRAP_UI(BASIC_SCENE_APPLICATIONS_SOURCES | |
63 BasicSceneWindow.ui | |
64 ) | |
65 | |
66 ORTHANC_QT_WRAP_CPP(BASIC_SCENE_APPLICATIONS_SOURCES | |
67 BasicSceneWindow.h | |
68 QStoneOpenGlWidget.h | |
69 ) | |
70 | |
71 add_executable(BasicScene | |
72 BasicScene.cpp | |
73 QStoneOpenGlWidget.cpp | |
74 ${BASIC_SCENE_APPLICATIONS_SOURCES} | |
75 ) | |
76 | |
77 target_include_directories(BasicScene PUBLIC ${CMAKE_SOURCE_DIR}) | |
78 | |
79 target_link_libraries(BasicScene OrthancStone) |