view Samples/Sdl/CMakeLists.txt @ 651:62f6ff016085

Iteration in angle measuring tool. Text label is not ok and handles and arcs (and maybe angle sides) should not scale with zoom.
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 14 May 2019 09:48:14 +0200
parents 1e9ed656318e
children 8b6adfb62a2f
line wrap: on
line source

cmake_minimum_required(VERSION 2.8.3)

#####################################################################
## Configuration of the Orthanc framework
#####################################################################

# This CMake file defines the "ORTHANC_STONE_VERSION" macro, so it
# must be the first inclusion
include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/Version.cmake)

if (ORTHANC_STONE_VERSION STREQUAL "mainline")
  set(ORTHANC_FRAMEWORK_VERSION "mainline")
  set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg")
else()
  set(ORTHANC_FRAMEWORK_VERSION "1.5.7")
  set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web")
endif()

set(ORTHANC_FRAMEWORK_SOURCE "${ORTHANC_FRAMEWORK_DEFAULT_SOURCE}" CACHE STRING "Source of the Orthanc source code (can be \"hg\", \"archive\", \"web\" or \"path\")")
set(ORTHANC_FRAMEWORK_ARCHIVE "" CACHE STRING "Path to the Orthanc archive, if ORTHANC_FRAMEWORK_SOURCE is \"archive\"")
set(ORTHANC_FRAMEWORK_ROOT "" CACHE STRING "Path to the Orthanc source directory, if ORTHANC_FRAMEWORK_SOURCE is \"path\"")


#####################################################################
## Configuration of the Stone framework
#####################################################################

include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneParameters.cmake)
include(${ORTHANC_ROOT}/Resources/CMake/DownloadPackage.cmake)

DownloadPackage(
  "a24b8136b8f3bb93f166baf97d9328de"
  "http://orthanc.osimis.io/ThirdPartyDownloads/ubuntu-font-family-0.83.zip"
  "${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83")

set(ORTHANC_STONE_APPLICATION_RESOURCES
  UBUNTU_FONT  ${CMAKE_BINARY_DIR}/ubuntu-font-family-0.83/Ubuntu-R.ttf
  )

SET(ENABLE_SDL_CONSOLE OFF CACHE BOOL "Enable the use of the MIT-licensed SDL_Console")
SET(ENABLE_GOOGLE_TEST OFF)
SET(ENABLE_LOCALE ON)
SET(ENABLE_SDL ON)
SET(ENABLE_WEB_CLIENT ON)
SET(ORTHANC_SANDBOXED OFF)
LIST(APPEND ORTHANC_BOOST_COMPONENTS program_options)

include(${CMAKE_SOURCE_DIR}/../../Resources/CMake/OrthancStoneConfiguration.cmake)

#####################################################################
## Build the samples
#####################################################################

add_library(OrthancStone STATIC
  ${ORTHANC_STONE_SOURCES}
  )

add_executable(BasicScene
  BasicScene.cpp
  )

target_link_libraries(BasicScene OrthancStone)

if(ENABLE_SDL_CONSOLE)
  add_definitions(
    -DENABLE_SDL_CONSOLE=1
    )
  LIST(APPEND TRACKERSAMPLE_SOURCE "../../../SDL-Console/SDL_Console.c")
  LIST(APPEND TRACKERSAMPLE_SOURCE "../../../SDL-Console/SDL_Console.h")
endif()

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/AngleMeasureTool.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/AngleMeasureTool.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateAngleMeasureTracker.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateAngleMeasureTracker.h")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateCircleMeasureTracker.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateCircleMeasureTracker.h")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateLineMeasureTracker.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateLineMeasureTracker.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateMeasureTracker.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateMeasureTracker.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/CreateSimpleTrackerAdapter.cpp")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditAngleMeasureTracker.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditAngleMeasureTracker.h")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditCircleMeasureTracker.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditCircleMeasureTracker.h")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditLineMeasureTracker.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/EditLineMeasureTracker.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/IFlexiblePointerTracker.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/LineMeasureTool.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/LineMeasureTool.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureCommands.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureCommands.h")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTools.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTools.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureToolsToolbox.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureToolsToolbox.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTrackers.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "../Common/MeasureTrackers.h")

LIST(APPEND TRACKERSAMPLE_SOURCE "TrackerSample.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "TrackerSampleApp.cpp")
LIST(APPEND TRACKERSAMPLE_SOURCE "TrackerSampleApp.h")

if (MSVC AND MSVC_VERSION GREATER 1700)
  LIST(APPEND TRACKERSAMPLE_SOURCE "cpp.hint")
endif()

add_executable(TrackerSample
  ${TRACKERSAMPLE_SOURCE}
  )

target_link_libraries(TrackerSample OrthancStone)

add_executable(Loader
  Loader.cpp
  )

target_link_libraries(Loader OrthancStone)