comparison CMakeLists.txt @ 2034:07f2ba3677df

Fix of Debian bug #823139 ("orthanc: Please provide RecoverCompressedFile.cpp")
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 21 Jun 2016 12:58:25 +0200
parents e7e1858d9504
children 9dd1ee869b88
comparison
equal deleted inserted replaced
2033:bfdf24883ff3 2034:07f2ba3677df
27 SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages") 27 SET(ALLOW_DOWNLOADS OFF CACHE BOOL "Allow CMake to download packages")
28 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests") 28 SET(UNIT_TESTS_WITH_HTTP_CONNEXIONS ON CACHE BOOL "Allow unit tests to make HTTP requests")
29 SET(ENABLE_JPEG ON CACHE BOOL "Enable JPEG decompression") 29 SET(ENABLE_JPEG ON CACHE BOOL "Enable JPEG decompression")
30 SET(ENABLE_JPEG_LOSSLESS ON CACHE BOOL "Enable JPEG-LS (Lossless) decompression") 30 SET(ENABLE_JPEG_LOSSLESS ON CACHE BOOL "Enable JPEG-LS (Lossless) decompression")
31 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins") 31 SET(ENABLE_PLUGINS ON CACHE BOOL "Enable plugins")
32 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Build the ServeFolders plugin") 32 SET(BUILD_SERVE_FOLDERS ON CACHE BOOL "Whether to build the ServeFolders plugin")
33 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Build the sample plugin to serve modality worklists") 33 SET(BUILD_MODALITY_WORKLISTS ON CACHE BOOL "Whether to build the sample plugin to serve modality worklists")
34 SET(BUILD_RECOVER_COMPRESSED_FILE ON CACHE BOOL "Whether to build the companion tool to recover files compressed using Orthanc")
34 SET(USE_DCMTK_361 OFF CACHE BOOL "Use forthcoming DCMTK version 3.6.1 in static builds (instead of 3.6.0)") 35 SET(USE_DCMTK_361 OFF CACHE BOOL "Use forthcoming DCMTK version 3.6.1 in static builds (instead of 3.6.0)")
35 SET(ENABLE_PKCS11 OFF CACHE BOOL "Enable PKCS#11 for HTTPS client authentication using hardware security modules and smart cards") 36 SET(ENABLE_PKCS11 OFF CACHE BOOL "Enable PKCS#11 for HTTPS client authentication using hardware security modules and smart cards")
36 37
37 # Advanced parameters to fine-tune linking against system libraries 38 # Advanced parameters to fine-tune linking against system libraries
38 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp") 39 SET(USE_SYSTEM_JSONCPP ON CACHE BOOL "Use the system version of JsonCpp")
595 endif() 596 endif()
596 597
597 598
598 599
599 ##################################################################### 600 #####################################################################
601 ## Build the companion tool to recover files compressed using Orthanc
602 #####################################################################
603
604 if (BUILD_RECOVER_COMPRESSED_FILE)
605 set(RECOVER_COMPRESSED_SOURCES
606 Resources/Samples/Tools/RecoverCompressedFile.cpp
607 )
608
609 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
610 execute_process(
611 COMMAND
612 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
613 ${ORTHANC_VERSION} OrthancRecoverCompressedFile OrthancRecoverCompressedFile.exe
614 "Lightweight, RESTful DICOM server for medical imaging"
615 ERROR_VARIABLE Failure
616 OUTPUT_FILE ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc
617 )
618
619 if (Failure)
620 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
621 endif()
622
623 list(APPEND RECOVER_COMPRESSED_SOURCES
624 ${AUTOGENERATED_DIR}/OrthancRecoverCompressedFile.rc
625 )
626 endif()
627
628 add_executable(OrthancRecoverCompressedFile
629 ${RECOVER_COMPRESSED_SOURCES}
630 ${ZLIB_SOURCES}
631 ${BOOST_SOURCES}
632 ${JSONCPP_SOURCES}
633 ${PUGIXML_SOURCES}
634 ${CMAKE_SOURCE_DIR}/Core/ChunkedBuffer.cpp
635 ${CMAKE_SOURCE_DIR}/Core/Logging.cpp
636 ${CMAKE_SOURCE_DIR}/Core/Enumerations.cpp
637 ${CMAKE_SOURCE_DIR}/Core/Toolbox.cpp
638 ${CMAKE_SOURCE_DIR}/Core/Compression/DeflateBaseCompressor.cpp
639 ${CMAKE_SOURCE_DIR}/Core/Compression/ZlibCompressor.cpp
640 ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/md5/md5.c
641 ${CMAKE_SOURCE_DIR}/Resources/ThirdParty/base64/base64.cpp
642 )
643
644 install(
645 TARGETS OrthancRecoverCompressedFile
646 RUNTIME DESTINATION bin
647 )
648 endif()
649
650
651
652 #####################################################################
600 ## Generate the documentation if Doxygen is present 653 ## Generate the documentation if Doxygen is present
601 ##################################################################### 654 #####################################################################
602 655
603 find_package(Doxygen) 656 find_package(Doxygen)
604 if (DOXYGEN_FOUND) 657 if (DOXYGEN_FOUND)