view StoneWebViewer/Plugin/CMakeLists.txt @ 1495:fb74ed5d8c22

initial commit of the Stone Web viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 25 Jun 2020 16:51:10 +0200
parents
children d450653b46d3
line wrap: on
line source

cmake_minimum_required(VERSION 2.8.3)

project(StoneWebViewerPlugin)

set(ORTHANC_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../orthanc CACHE PATH "")
set(STONE_BINARIES CACHE PATH "")

include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkParameters.cmake)
set(ENABLE_MODULE_IMAGES OFF)
set(ENABLE_MODULE_JOBS OFF)
set(ENABLE_MODULE_DICOM OFF)
include(${ORTHANC_ROOT}/Resources/CMake/OrthancFrameworkConfiguration.cmake)

include_directories(
  ${ORTHANC_ROOT}/Core
  ${ORTHANC_ROOT}/Plugins/Samples/Common
  ${ORTHANC_ROOT}/Plugins/Include  # TODO => Fix a version
  )

add_definitions(
  -DHAS_ORTHANC_EXCEPTION=1
  -DPLUGIN_VERSION="mainline"  # TODO
  -DPLUGIN_NAME="stone-webviewer"
  )

EmbedResources(
  ORTHANC_EXPLORER       ${CMAKE_SOURCE_DIR}/OrthancExplorer.js
  STONE_WRAPPER          ${STONE_BINARIES}/stone.js
  STONE_WEB_VIEWER_JS    ${STONE_BINARIES}/StoneWebViewer.js
  STONE_WEB_VIEWER_WASM  ${STONE_BINARIES}/StoneWebViewer.wasm
  WEB_APPLICATION        ${CMAKE_SOURCE_DIR}/../WebApplication
  IMAGES                 ${STONE_BINARIES}/img/
  )

add_library(StoneWebViewer SHARED
  Plugin.cpp
  ${AUTOGENERATED_SOURCES}
  ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
  ${ORTHANC_CORE_SOURCES}
  )