view Platforms/Generic/CMakeLists.txt @ 130:1982d6c1d2ff wasm

IVolumeLoader
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 16 Nov 2017 13:46:03 +0100
parents b963f3a9a86c
children a06ad9d7406e
line wrap: on
line source

cmake_minimum_required(VERSION 2.8)
project(OrthancStone)


#####################################################################
## Build a static library containing the Orthanc Stone framework
#####################################################################

include(../../Resources/CMake/OrthancStoneParameters.cmake)

SET(ORTHANC_SANDBOXED OFF)
SET(ORTHANC_BOOST_COMPONENTS program_options)
SET(ENABLE_CRYPTO_OPTIONS ON)
SET(ENABLE_GOOGLE_TEST ON)
SET(ENABLE_WEB_CLIENT ON)

include(../../Resources/CMake/OrthancStoneConfiguration.cmake)
include(../../Resources/CMake/BoostExtendedConfiguration.cmake)

add_library(OrthancStone STATIC
  ${ORTHANC_STONE_SOURCES}
  ${BOOST_EXTENDED_SOURCES}
  )


#####################################################################
## Build all the sample applications
#####################################################################

macro(BuildSample Target Sample)
  add_executable(${Target}
    ${ORTHANC_STONE_DIR}/Applications/Samples/SampleMainSdl.cpp
    ${APPLICATIONS_SOURCES}
    )
  set_target_properties(${Target} PROPERTIES COMPILE_DEFINITIONS ORTHANC_STONE_SAMPLE=${Sample})
  target_link_libraries(${Target} OrthancStone)
endmacro()


# TODO - Re-enable all these samples!

BuildSample(OrthancStoneEmpty 1)
BuildSample(OrthancStoneTestPattern 2)
BuildSample(OrthancStoneSingleFrame 3)
BuildSample(OrthancStoneSingleVolume 4)
#BuildSample(OrthancStoneBasicPetCtFusion 5)
#BuildSample(OrthancStoneSynchronizedSeries 6)
#BuildSample(OrthancStoneLayoutPetCtFusion 7)


#####################################################################
## Build the unit tests
#####################################################################

add_executable(UnitTests
  ${GOOGLE_TEST_SOURCES}
  ${ORTHANC_STONE_DIR}/UnitTestsSources/UnitTestsMain.cpp
  )

target_link_libraries(UnitTests OrthancStone)


#####################################################################
## Generate the documentation if Doxygen is present
#####################################################################

find_package(Doxygen)
if (DOXYGEN_FOUND)
  configure_file(
    ${ORTHANC_STONE_DIR}/Resources/OrthancStone.doxygen
    ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
    @ONLY)

  add_custom_target(doc
    ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OrthancStone.doxygen
    COMMENT "Generating documentation with Doxygen" VERBATIM
    )
else()
  message("Doxygen not found. The documentation will not be built.")
endif()