annotate Applications/Samples/CMakeLists.txt @ 1223:04fd875b91f4

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 07 Dec 2019 18:41:54 +0100
parents f417a0ae282b
children 41d19fa749b7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
1 # Usage (Linux):
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
2 # to build the WASM samples
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
3 # source ~/Downloads/emsdk/emsdk_env.sh && cmake -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=Release -DSTONE_SOURCES_DIR=$currentDir/../../../orthanc-stone -DORTHANC_FRAMEWORK_SOURCE=path -DORTHANC_FRAMEWORK_ROOT=$currentDir/../../../orthanc -DALLOW_DOWNLOADS=ON .. -DENABLE_WASM=ON
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
4 # to build the Qt samples
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
5
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
6 cmake_minimum_required(VERSION 2.8.3)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
7 project(OrthancStone)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
8
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
9 include(../../Resources/CMake/OrthancStoneParameters.cmake)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
10
740
31487d066d1d new CMake internal option: ENABLE_STONE_DEPRECATED
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 732
diff changeset
11 set(ENABLE_STONE_DEPRECATED ON) # Need deprecated classes for these samples
1190
f417a0ae282b wip: TextLayer with new fonts
Alain Mazy <alain@mazy.be>
parents: 1168
diff changeset
12 set(EMSCRIPTEN_SET_LLVM_WASM_BACKEND ON)
740
31487d066d1d new CMake internal option: ENABLE_STONE_DEPRECATED
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 732
diff changeset
13
1085
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
14 include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
15 DownloadPackage(
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
16 "a24b8136b8f3bb93f166baf97d9328de"
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
17 "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
18 "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
19
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
20 set(ORTHANC_STONE_APPLICATION_RESOURCES
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
21 UBUNTU_FONT ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
63539e826355 Added TextRenderer
Alain Mazy <alain@mazy.be>
parents: 1080
diff changeset
22 )
740
31487d066d1d new CMake internal option: ENABLE_STONE_DEPRECATED
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 732
diff changeset
23
527
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
24 if (OPENSSL_NO_CAPIENG)
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
25 add_definitions(-DOPENSSL_NO_CAPIENG=1)
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
26 endif()
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
27
548
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
28
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
29 # the following block has been borrowed from orthanc/**/Compiler.cmake
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
30 if (MSVC_MULTIPLE_PROCESSES)
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
31 # "If you omit the processMax argument in the /MP option, the
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
32 # compiler obtains the number of effective processors from the
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
33 # operating system, and then creates one process per effective
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
34 # processor"
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
35 # https://blog.kitware.com/cmake-building-with-all-your-cores/
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
36 # https://docs.microsoft.com/en-us/cpp/build/reference/mp-build-with-multiple-processes
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
37 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
38 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
39 endif()
d10a295b607a Added /MP option to cmakefile and improved readme with Windows command lines for configure/build
Benjamin Golinvaux <bgo@osimis.io>
parents: 532
diff changeset
40
338
b3b3fa0e3689 BitmapStack
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 326
diff changeset
41 #set(ENABLE_DCMTK ON)
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
42
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
43 set(ENABLE_SDL OFF CACHE BOOL "Target SDL Native application")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
44 set(ENABLE_QT OFF CACHE BOOL "Target Qt Native application")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
45 set(ENABLE_WASM OFF CACHE BOOL "Target WASM application")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
46
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
47 if (ENABLE_WASM)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
48 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
49 ## Configuration of the Emscripten compiler for WebAssembly target
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
50 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
51
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
52 set(WASM_FLAGS "-s WASM=1")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
53 set(WASM_FLAGS "${WASM_FLAGS} -s STRICT=1") # drops support for all deprecated build options
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
54 set(WASM_FLAGS "${WASM_FLAGS} -s FILESYSTEM=1") # if we don't include it, gen_uuid.c fails to build because srand, getpid(), ... are not defined
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
55 set(WASM_FLAGS "${WASM_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0") # actually enable exception catching
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
56 set(WASM_FLAGS "${WASM_FLAGS} -s ERROR_ON_MISSING_LIBRARIES=1")
1190
f417a0ae282b wip: TextLayer with new fonts
Alain Mazy <alain@mazy.be>
parents: 1168
diff changeset
57
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
58 if (CMAKE_BUILD_TYPE MATCHES DEBUG)
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
59 set(WASM_FLAGS "${WASM_FLAGS} -g4") # generate debug information
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
60 set(WASM_FLAGS "${WASM_FLAGS} -s ASSERTIONS=2") # more runtime checks
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
61 else()
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
62 set(WASM_FLAGS "${WASM_FLAGS} -Os") # optimize for web (speed and size)
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
63 endif()
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
64
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
65 set(WASM_MODULE_NAME "StoneFrameworkModule" CACHE STRING "Name of the WebAssembly module")
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
66
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
67 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WASM_FLAGS}")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
68 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WASM_FLAGS}")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
69
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
70 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WASM_FLAGS}") # not always clear which flags are for the compiler and which one are for the linker -> pass them all to the linker too
522
700aa66f2f29 Removed deleted file from cmakelists + fixed renames in compilation. Samples build OK in WAS but still not fully functional
Benjamin Golinvaux <bgo@osimis.io>
parents: 518
diff changeset
71 # set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --js-library ${STONE_SOURCES_DIR}/Applications/Samples/samples-library.js")
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
72 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --js-library ${STONE_SOURCES_DIR}/Platforms/Wasm/WasmWebService.js")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
73 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --js-library ${STONE_SOURCES_DIR}/Platforms/Wasm/WasmDelayedCallExecutor.js")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
74 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --js-library ${STONE_SOURCES_DIR}/Platforms/Wasm/default-library.js")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
75 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
76 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXPORT_NAME='\"${WASM_MODULE_NAME}\"'")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
77 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s ALLOW_MEMORY_GROWTH=1")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
78 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s TOTAL_MEMORY=536870912")
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
79 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s TOTAL_STACK=128000000")
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
80
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
81 add_definitions(-DORTHANC_ENABLE_WASM=1)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
82 set(ORTHANC_SANDBOXED ON)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
83
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
84 elseif (ENABLE_QT OR ENABLE_SDL)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
85
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
86 set(ENABLE_NATIVE ON)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
87 set(ORTHANC_SANDBOXED OFF)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
88 set(ENABLE_CRYPTO_OPTIONS ON)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
89 set(ENABLE_GOOGLE_TEST ON)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
90 set(ENABLE_WEB_CLIENT ON)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
91
1168
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
92 else()
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
93 set(ENABLE_NATIVE ON)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
94 set(ENABLE_OPENGL OFF)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
95
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
96 endif()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
97
857
0c0fc20a6902 macro ORTHANC_ENABLE_LOGGING_PLUGIN must be defined per app, not by stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 740
diff changeset
98
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
99 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
100 ## Configuration for Orthanc
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
101 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
102
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
103 # include(../../Resources/CMake/Version.cmake)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
104
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
105 if (ORTHANC_STONE_VERSION STREQUAL "mainline")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
106 set(ORTHANC_FRAMEWORK_VERSION "mainline")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
107 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
108 else()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
109 set(ORTHANC_FRAMEWORK_VERSION "1.4.1")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
110 set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
111 endif()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
112
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
113 set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
114 set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
115 set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
116
857
0c0fc20a6902 macro ORTHANC_ENABLE_LOGGING_PLUGIN must be defined per app, not by stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 740
diff changeset
117 add_definitions(
0c0fc20a6902 macro ORTHANC_ENABLE_LOGGING_PLUGIN must be defined per app, not by stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 740
diff changeset
118 -DORTHANC_ENABLE_LOGGING_PLUGIN=0
0c0fc20a6902 macro ORTHANC_ENABLE_LOGGING_PLUGIN must be defined per app, not by stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 740
diff changeset
119 )
0c0fc20a6902 macro ORTHANC_ENABLE_LOGGING_PLUGIN must be defined per app, not by stone
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 740
diff changeset
120
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
121
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
122 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
123 ## Build a static library containing the Orthanc Stone framework
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
124 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
125
518
40bb5eb247a5 Reverted a couple of files to AM version (wrong changes on my end)
Benjamin Golinvaux <bgo@osimis.io>
parents: 506
diff changeset
126
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
127 LIST(APPEND ORTHANC_BOOST_COMPONENTS program_options)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
128
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
129 include(../../Resources/CMake/OrthancStoneConfiguration.cmake)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
130
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
131 add_library(OrthancStone STATIC
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
132 ${ORTHANC_STONE_SOURCES}
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
133 )
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
134
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
135 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
136 ## Build all the sample applications
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
137 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
138
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
139 include_directories(${ORTHANC_STONE_ROOT})
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
140
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
141 # files common to all samples
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
142 list(APPEND SAMPLE_APPLICATIONS_SOURCES
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
143 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleInteractor.h
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
144 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleApplicationBase.h
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
145 )
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
146
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
147 if (ENABLE_QT)
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
148 list(APPEND SAMPLE_APPLICATIONS_SOURCES
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
149 ${ORTHANC_STONE_ROOT}/Applications/Samples/Qt/SampleQtApplicationRunner.h
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
150 ${ORTHANC_STONE_ROOT}/Applications/Samples/Qt/SampleMainWindow.cpp
365
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
151 ${ORTHANC_STONE_ROOT}/Applications/Samples/Qt/SampleMainWindowWithButtons.cpp
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
152 )
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
153
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
154 ORTHANC_QT_WRAP_UI(SAMPLE_APPLICATIONS_SOURCES
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
155 ${ORTHANC_STONE_ROOT}/Applications/Samples/Qt/SampleMainWindow.ui
326
612238b3f3e8 all 4 samples now working in Qt, SDL and wasm
am@osimis.io
parents: 325
diff changeset
156 ${ORTHANC_STONE_ROOT}/Applications/Samples/Qt/SampleMainWindowWithButtons.ui
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
157 )
365
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
158
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
159 ORTHANC_QT_WRAP_CPP(SAMPLE_APPLICATIONS_SOURCES
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
160 ${ORTHANC_STONE_ROOT}/Applications/Qt/QCairoWidget.h
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
161 ${ORTHANC_STONE_ROOT}/Applications/Qt/QStoneMainWindow.h
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
162 ${ORTHANC_STONE_ROOT}/Applications/Samples/Qt/SampleMainWindow.h
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
163 ${ORTHANC_STONE_ROOT}/Applications/Samples/Qt/SampleMainWindowWithButtons.h
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
164 )
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
165 endif()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
166
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
167 if (ENABLE_NATIVE)
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
168 list(APPEND SAMPLE_APPLICATIONS_SOURCES
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
169 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleMainNative.cpp
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
170 )
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
171
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
172 elseif (ENABLE_WASM)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
173
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
174 list(APPEND SAMPLE_APPLICATIONS_SOURCES
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
175 ${ORTHANC_STONE_ROOT}/Applications/Samples/SampleMainWasm.cpp
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
176 ${STONE_WASM_SOURCES}
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
177 )
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
178 endif()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
179
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
180
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
181 macro(BuildSingleFileSample Target Header Sample)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
182 add_executable(${Target}
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
183 ${ORTHANC_STONE_ROOT}/Applications/Samples/${Header}
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
184 ${SAMPLE_APPLICATIONS_SOURCES}
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
185 )
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
186 set_target_properties(${Target} PROPERTIES COMPILE_DEFINITIONS ORTHANC_STONE_SAMPLE=${Sample})
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
187 target_link_libraries(${Target} OrthancStone)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
188 endmacro()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
189
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
190
1168
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
191 if (ENABLE_SDL)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
192 #BuildSingleFileSample(OrthancStoneEmpty EmptyApplication.h 1)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
193 #BuildSingleFileSample(OrthancStoneTestPattern TestPatternApplication.h 2)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
194 BuildSingleFileSample(OrthancStoneSingleFrame SingleFrameApplication.h 3)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
195 #BuildSingleFileSample(OrthancStoneSingleVolume SingleVolumeApplication.h 4)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
196 #BuildSingleFileSample(OrthancStoneBasicPetCtFusion 5)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
197 #BuildSingleFileSample(OrthancStoneSynchronizedSeries 6)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
198 #BuildSingleFileSample(OrthancStoneLayoutPetCtFusion 7)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
199 BuildSingleFileSample(OrthancStoneSimpleViewerSingleFile SimpleViewerApplicationSingleFile.h 8) # we keep that one just as a sample before we convert another sample to this pattern
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
200 BuildSingleFileSample(OrthancStoneSingleFrameEditor SingleFrameEditorApplication.h 9)
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
201 endif()
f2951ac074bd allow compiling unit tests with sdl
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1085
diff changeset
202
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
203 ##### SimpleViewer sample (Qt and WASM only) #######
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
204
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
205 if (ENABLE_QT OR ENABLE_WASM)
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
206
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
207 if (ENABLE_QT)
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
208 list(APPEND SIMPLE_VIEWER_APPLICATION_SOURCES
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
209 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Qt/SimpleViewerMainWindow.cpp
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
210 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Qt/SimpleViewerMainWindow.ui
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
211 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Qt/mainQt.cpp
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
212 )
365
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
213
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
214 ORTHANC_QT_WRAP_UI(SIMPLE_VIEWER_APPLICATION_SOURCES
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
215 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Qt/SimpleViewerMainWindow.ui
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
216 )
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
217
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
218 ORTHANC_QT_WRAP_CPP(SIMPLE_VIEWER_APPLICATION_SOURCES
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
219 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Qt/SimpleViewerMainWindow.h
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
220 )
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
221
ef31240a73f6 no automatic call to moc and uic, CircleMeasureTracker using Orthanc fonts
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 338
diff changeset
222 elseif (ENABLE_WASM)
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
223 list(APPEND SIMPLE_VIEWER_APPLICATION_SOURCES
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
224 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Wasm/mainWasm.cpp
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
225 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Wasm/SimpleViewerWasmApplicationAdapter.cpp
527
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
226 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/Wasm/SimpleViewerWasmApplicationAdapter.h
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
227 ${STONE_WASM_SOURCES}
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
228 )
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
229 endif()
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
230
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
231 add_executable(OrthancStoneSimpleViewer
527
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
232 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/AppStatus.h
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
233 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/MainWidgetInteractor.cpp
527
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
234 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/MainWidgetInteractor.h
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
235 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/SimpleViewerApplication.cpp
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
236 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/SimpleViewerApplication.h
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
237 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/ThumbnailInteractor.cpp
b1377625e4ba Removed ICommand and friends + fixed warnings + added missing header files in
Benjamin Golinvaux <bgo@osimis.io>
parents: 522
diff changeset
238 ${ORTHANC_STONE_ROOT}/Applications/Samples/SimpleViewer/ThumbnailInteractor.h
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
239 ${SIMPLE_VIEWER_APPLICATION_SOURCES}
319
daa04d15192c new SimpleViewer sample that has been split in multiple files to be able to scale it
am@osimis.io
parents: 299
diff changeset
240 )
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
241 target_link_libraries(OrthancStoneSimpleViewer OrthancStone)
1190
f417a0ae282b wip: TextLayer with new fonts
Alain Mazy <alain@mazy.be>
parents: 1168
diff changeset
242
f417a0ae282b wip: TextLayer with new fonts
Alain Mazy <alain@mazy.be>
parents: 1168
diff changeset
243 BuildSingleFileSample(OrthancStoneSingleFrameEditor SingleFrameEditorApplication.h 9)
324
29a79b8c3d39 fix SDL build
am@osimis.io
parents: 319
diff changeset
244 endif()
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
245
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
246 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
247 ## Build the unit tests
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
248 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
249
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
250 if (ENABLE_NATIVE)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
251 add_executable(UnitTests
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
252 ${GOOGLE_TEST_SOURCES}
1080
287ec78f63b4 GenericToolbox (fast c-string --> double or integer) + refactoring to be able
Benjamin Golinvaux <bgo@osimis.io>
parents: 1049
diff changeset
253 ${ORTHANC_STONE_ROOT}/UnitTestsSources/GenericToolboxTests.cpp
298
f58bfb7bbcc9 introduced StoneException
am@osimis.io
parents: 295
diff changeset
254 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestCommands.cpp
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
255 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestMessageBroker.cpp
695
7bf91c4ebd65 strategy
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 573
diff changeset
256 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStrategy.cpp
999
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
257 ${ORTHANC_STONE_ROOT}/UnitTestsSources/TestStructureSet.cpp
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
258 ${ORTHANC_STONE_ROOT}/UnitTestsSources/UnitTestsMain.cpp
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
259 )
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
260
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
261 target_link_libraries(UnitTests OrthancStone)
999
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
262
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
263 add_custom_command(
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
264 TARGET UnitTests
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
265 POST_BUILD
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
266 COMMAND ${CMAKE_COMMAND} -E copy
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
267 "${ORTHANC_STONE_ROOT}/UnitTestsSources/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
268 "$<TARGET_FILE_DIR:UnitTests>/72c773ac-5059f2c4-2e6a9120-4fd4bca1-45701661.json"
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
269 )
2d69b8bee484 Added tests for Dicom structure set classes (loaders and utils)
Benjamin Golinvaux <bgo@osimis.io>
parents: 857
diff changeset
270
295
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
271 endif()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
272
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
273 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
274 ## Generate the documentation if Doxygen is present
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
275 #####################################################################
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
276
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
277 find_package(Doxygen)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
278 if (DOXYGEN_FOUND)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
279 configure_file(
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
280 ${ORTHANC_STONE_ROOT}/Resources/OrthancStone.doxygen
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
281 ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
282 @ONLY)
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
283
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
284 add_custom_target(doc
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
285 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
286 COMMENT "Generating documentation with Doxygen" VERBATIM
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
287 )
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
288 else()
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
289 message("Doxygen not found. The documentation will not be built.")
b04b13810540 unified CMakeLists.txt into a single file for WASM/Native + bootstrap Command (to rework) + doc
am@osimis.io
parents:
diff changeset
290 endif()