Mercurial > hg > orthanc
comparison OrthancServer/CMakeLists.txt @ 4981:d0c34145320c
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 25 Apr 2022 17:32:58 +0200 |
parents | f316413027fd |
children | c2ebc47f4f18 |
comparison
equal
deleted
inserted
replaced
4980:8b95fc86b8d9 | 4981:d0c34145320c |
---|---|
314 | 314 |
315 # Macros for the plugins | 315 # Macros for the plugins |
316 -DHAS_ORTHANC_EXCEPTION=0 | 316 -DHAS_ORTHANC_EXCEPTION=0 |
317 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}" | 317 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}" |
318 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}" | 318 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}" |
319 -DDB_OPTIMIZER_VERSION="${ORTHANC_VERSION}" | 319 -DHOUSEKEEPER_VERSION="${ORTHANC_VERSION}" |
320 ) | 320 ) |
321 | 321 |
322 | 322 |
323 # Setup precompiled headers for Microsoft Visual Studio | 323 # Setup precompiled headers for Microsoft Visual Studio |
324 | 324 |
427 ##################################################################### | 427 ##################################################################### |
428 ## Build a static library to share code between the plugins | 428 ## Build a static library to share code between the plugins |
429 ##################################################################### | 429 ##################################################################### |
430 | 430 |
431 if (ENABLE_PLUGINS AND | 431 if (ENABLE_PLUGINS AND |
432 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS OR BUILD_DB_OPTIMIZER)) | 432 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS OR BUILD_HOUSEKEEPER)) |
433 add_library(ThirdPartyPlugins STATIC | 433 add_library(ThirdPartyPlugins STATIC |
434 ${BOOST_SOURCES} | 434 ${BOOST_SOURCES} |
435 ${JSONCPP_SOURCES} | 435 ${JSONCPP_SOURCES} |
436 ${LIBICONV_SOURCES} | 436 ${LIBICONV_SOURCES} |
437 ${LIBICU_SOURCES} | 437 ${LIBICU_SOURCES} |
608 | 608 |
609 ##################################################################### | 609 ##################################################################### |
610 ## Build the "Housekeeper" plugin | 610 ## Build the "Housekeeper" plugin |
611 ##################################################################### | 611 ##################################################################### |
612 | 612 |
613 if (ENABLE_PLUGINS AND BUILD_DB_OPTIMIZER) | 613 if (ENABLE_PLUGINS AND BUILD_HOUSEKEEPER) |
614 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 614 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
615 execute_process( | 615 execute_process( |
616 COMMAND | 616 COMMAND |
617 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py | 617 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py |
618 ${ORTHANC_VERSION} Housekeeper Housekeeper.dll "Sample Orthanc plugin to optimize/clean the DB/Storage" | 618 ${ORTHANC_VERSION} Housekeeper Housekeeper.dll "Sample Orthanc plugin to optimize/clean the DB/Storage" |
619 ERROR_VARIABLE Failure | 619 ERROR_VARIABLE Failure |
620 OUTPUT_FILE ${AUTOGENERATED_DIR}/Housekeeper.rc | 620 OUTPUT_FILE ${AUTOGENERATED_DIR}/Housekeeper.rc |
621 ) | 621 ) |
622 | 622 |
623 if (Failure) | 623 if (Failure) |
624 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | 624 message(FATAL_ERROR "Error while computing the version information: ${Failure}") |
625 endif() | 625 endif() |
626 | 626 |
627 list(APPEND HOUSEKEEPER_RESOURCES ${AUTOGENERATED_DIR}/Housekeeper.rc) | 627 list(APPEND HOUSEKEEPER_RESOURCES ${AUTOGENERATED_DIR}/Housekeeper.rc) |
628 endif() | 628 endif() |
629 | 629 |
630 add_library(Housekeeper SHARED | 630 add_library(Housekeeper SHARED |
631 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp | 631 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp |
632 ${HOUSEKEEPER_RESOURCES} | 632 ${HOUSEKEEPER_RESOURCES} |
633 ) | 633 ) |
634 | 634 |
635 target_link_libraries(Housekeeper | 635 target_link_libraries(Housekeeper |
636 ThirdPartyPlugins | 636 ThirdPartyPlugins |
637 ) | 637 ) |
638 | 638 |
639 set_target_properties( | 639 set_target_properties( |
640 Housekeeper PROPERTIES | 640 Housekeeper PROPERTIES |
641 VERSION ${ORTHANC_VERSION} | 641 VERSION ${ORTHANC_VERSION} |
642 SOVERSION ${ORTHANC_VERSION} | 642 SOVERSION ${ORTHANC_VERSION} |
643 ) | 643 ) |
644 | 644 |
645 install( | 645 install( |
646 TARGETS Housekeeper | 646 TARGETS Housekeeper |
647 RUNTIME DESTINATION lib # Destination for Windows | 647 RUNTIME DESTINATION lib # Destination for Windows |
648 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | 648 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux |
649 ) | 649 ) |
650 endif() | 650 endif() |
651 | 651 |
652 | 652 |
653 ##################################################################### | 653 ##################################################################### |
654 ## Build the companion tool to recover files compressed using Orthanc | 654 ## Build the companion tool to recover files compressed using Orthanc |