annotate Deprecated/Samples/Qt/CMakeLists.txt @ 1471:28c64c246312

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