comparison CMakeLists.txt @ 1808:9c2ffc4e938b worklists

configuration of the sample modality worklists plugin
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 23 Nov 2015 16:58:55 +0100
parents af6840eb23ee
children e2c3d752ee1a
comparison
equal deleted inserted replaced
1807:91216c42c6e5 1808:9c2ffc4e938b
29 SET(ENABLE_GOOGLE_LOG OFF CACHE BOOL "Enable Google Log (otherwise, an internal logger is used)") 29 SET(ENABLE_GOOGLE_LOG OFF CACHE BOOL "Enable Google Log (otherwise, an internal logger is used)")
30 SET(ENABLE_JPEG ON CACHE BOOL "Enable JPEG decompression") 30 SET(ENABLE_JPEG ON CACHE BOOL "Enable JPEG decompression")
31 SET(ENABLE_JPEG_LOSSLESS ON CACHE BOOL "Enable JPEG-LS (Lossless) decompression") 31 SET(ENABLE_JPEG_LOSSLESS ON CACHE BOOL "Enable JPEG-LS (Lossless) decompression")
32 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins") 32 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins")
33 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Build the ServeFolders plugin") 33 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Build the ServeFolders plugin")
34 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Build the sample plugin to serve modality worklists")
34 35
35 # Advanced parameters to fine-tune linking against system libraries 36 # Advanced parameters to fine-tune linking against system libraries
36 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp") 37 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
37 SET(USE_SYSTEM_GOOGLE_LOG ON CACHE BOOL "Use the system version of Google Log") 38 SET(USE_SYSTEM_GOOGLE_LOG ON CACHE BOOL "Use the system version of Google Log")
38 SET(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test") 39 SET(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")
509 endif() 510 endif()
510 511
511 512
512 513
513 ##################################################################### 514 #####################################################################
515 ## Build the "ModalityWorklists" plugin
516 #####################################################################
517
518 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS)
519 execute_process(
520 COMMAND
521 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
522 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists"
523 ERROR_VARIABLE Failure
524 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc
525 )
526
527 if (Failure)
528 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
529 endif()
530
531 add_definitions(-DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}")
532
533 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include)
534
535 add_library(ModalityWorklists SHARED
536 ${BOOST_SOURCES}
537 ${JSONCPP_SOURCES}
538 Plugins/Samples/ModalityWorklists/Plugin.cpp
539 ${AUTOGENERATED_DIR}/ModalityWorklists.rc
540 )
541
542 set_target_properties(
543 ModalityWorklists PROPERTIES
544 VERSION ${ORTHANC_VERSION}
545 SOVERSION ${ORTHANC_VERSION}
546 )
547
548 install(
549 TARGETS ModalityWorklists
550 RUNTIME DESTINATION lib # Destination for Windows
551 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
552 )
553 endif()
554
555
556
557 #####################################################################
514 ## Generate the documentation if Doxygen is present 558 ## Generate the documentation if Doxygen is present
515 ##################################################################### 559 #####################################################################
516 560
517 find_package(Doxygen) 561 find_package(Doxygen)
518 if (DOXYGEN_FOUND) 562 if (DOXYGEN_FOUND)