Mercurial > hg > orthanc
comparison OrthancServer/CMakeLists.txt @ 5258:afe92108f463 db-protobuf
integration mainline->db-protobuf
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 Apr 2023 11:54:29 +0200 |
parents | d0f7c742d397 0b183bb77c83 |
children | a856daf71745 |
comparison
equal
deleted
inserted
replaced
5256:261ce0ed85e6 | 5258:afe92108f463 |
---|---|
322 | 322 |
323 | 323 |
324 add_definitions( | 324 add_definitions( |
325 -DORTHANC_BUILD_UNIT_TESTS=1 | 325 -DORTHANC_BUILD_UNIT_TESTS=1 |
326 -DORTHANC_BUILDING_SERVER_LIBRARY=1 | 326 -DORTHANC_BUILDING_SERVER_LIBRARY=1 |
327 | 327 |
328 # Macros for the plugins | 328 # Macros for the plugins |
329 -DHAS_ORTHANC_EXCEPTION=0 | 329 -DHAS_ORTHANC_EXCEPTION=0 |
330 -DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}" | |
331 -DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}" | |
332 -DHOUSEKEEPER_VERSION="${ORTHANC_VERSION}" | |
333 ) | 330 ) |
334 | 331 |
335 | 332 |
336 # Setup precompiled headers for Microsoft Visual Studio | 333 # Setup precompiled headers for Microsoft Visual Studio |
337 | 334 |
471 ##################################################################### | 468 ##################################################################### |
472 ## Build a static library to share code between the plugins | 469 ## Build a static library to share code between the plugins |
473 ##################################################################### | 470 ##################################################################### |
474 | 471 |
475 if (ENABLE_PLUGINS AND | 472 if (ENABLE_PLUGINS AND |
476 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS OR BUILD_HOUSEKEEPER)) | 473 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS OR BUILD_HOUSEKEEPER OR |
477 add_library(ThirdPartyPlugins STATIC | 474 BUILD_DELAYED_DELETION)) |
475 set(PLUGINS_FRAMEWORK_SOURCES | |
478 ${BOOST_SOURCES} | 476 ${BOOST_SOURCES} |
479 ${JSONCPP_SOURCES} | 477 ${JSONCPP_SOURCES} |
480 ${LIBICONV_SOURCES} | 478 ${LIBICONV_SOURCES} |
481 ${LIBICU_SOURCES} | 479 ${LIBICU_SOURCES} |
482 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | 480 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
483 ) | 481 ) |
484 | 482 |
485 if (LIBICU_LIBRARIES) | 483 if (BUILD_DELAYED_DELETION) |
486 target_link_libraries(ThirdPartyPlugins ${LIBICU_LIBRARIES}) | 484 list(APPEND PLUGINS_FRAMEWORK_SOURCES |
485 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/ThirdParty/base64/base64.cpp | |
486 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/ThirdParty/md5/md5.c | |
487 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/ChunkedBuffer.cpp | |
488 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/DeflateBaseCompressor.cpp | |
489 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/GzipCompressor.cpp | |
490 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/HierarchicalZipWriter.cpp | |
491 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/IBufferCompressor.cpp | |
492 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/ZipReader.cpp | |
493 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/ZipWriter.cpp | |
494 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/ZlibCompressor.cpp | |
495 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/DicomFormat/DicomTag.cpp | |
496 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Enumerations.cpp | |
497 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp | |
498 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Logging.cpp | |
499 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/MultiThreading/SharedMessageQueue.cpp | |
500 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/OrthancException.cpp | |
501 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/Connection.cpp | |
502 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/FunctionContext.cpp | |
503 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/Statement.cpp | |
504 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/StatementId.cpp | |
505 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/StatementReference.cpp | |
506 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/Transaction.cpp | |
507 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/StringMemoryBuffer.cpp | |
508 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SystemToolbox.cpp | |
509 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Toolbox.cpp | |
510 ${DCMTK_SOURCES} | |
511 ${PUGIXML_SOURCES} | |
512 ${UUID_SOURCES} | |
513 ${ZLIB_SOURCES} | |
514 ${SQLITE_SOURCES} | |
515 ) | |
487 endif() | 516 endif() |
517 | |
518 add_library(PluginsFramework STATIC | |
519 ${PLUGINS_FRAMEWORK_SOURCES} | |
520 ) | |
521 | |
522 # Remove the dependency upon ICU in plugins, as this greatly | |
523 # increase the size of the resulting binaries, since they must | |
524 # embed the ICU dictionary. | |
525 set_target_properties( | |
526 PluginsFramework | |
527 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_ENABLE_ICU=0" | |
528 ) | |
488 | 529 |
489 # Add the "-fPIC" option as this static library must be embedded | 530 # Add the "-fPIC" option as this static library must be embedded |
490 # inside shared libraries (important on UNIX) | 531 # inside shared libraries (important on UNIX) |
491 set_property( | 532 set_target_properties( |
492 TARGET ThirdPartyPlugins | 533 PluginsFramework |
493 PROPERTY POSITION_INDEPENDENT_CODE ON | 534 PROPERTIES POSITION_INDEPENDENT_CODE ON |
494 ) | 535 ) |
495 endif() | 536 endif() |
496 | 537 |
497 | 538 |
498 ##################################################################### | 539 ##################################################################### |
514 endif() | 555 endif() |
515 | 556 |
516 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) | 557 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) |
517 endif() | 558 endif() |
518 | 559 |
560 set_source_files_properties( | |
561 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp | |
562 PROPERTIES COMPILE_DEFINITIONS "SERVE_FOLDERS_VERSION=\"${ORTHANC_VERSION}\"" | |
563 ) | |
564 | |
519 add_library(ServeFolders SHARED | 565 add_library(ServeFolders SHARED |
520 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp | 566 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp |
521 ${SERVE_FOLDERS_RESOURCES} | 567 ${SERVE_FOLDERS_RESOURCES} |
522 ) | 568 ) |
523 | 569 |
524 target_link_libraries(ServeFolders ThirdPartyPlugins) | 570 target_link_libraries(ServeFolders PluginsFramework) |
525 | 571 |
526 set_target_properties( | 572 set_target_properties( |
527 ServeFolders PROPERTIES | 573 ServeFolders PROPERTIES |
528 VERSION ${ORTHANC_VERSION} | 574 VERSION ${ORTHANC_VERSION} |
529 SOVERSION ${ORTHANC_VERSION} | 575 SOVERSION ${ORTHANC_VERSION} |
557 endif() | 603 endif() |
558 | 604 |
559 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) | 605 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) |
560 endif() | 606 endif() |
561 | 607 |
608 set_source_files_properties( | |
609 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp | |
610 PROPERTIES COMPILE_DEFINITIONS "MODALITY_WORKLISTS_VERSION=\"${ORTHANC_VERSION}\"" | |
611 ) | |
612 | |
562 add_library(ModalityWorklists SHARED | 613 add_library(ModalityWorklists SHARED |
563 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp | 614 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp |
564 ${MODALITY_WORKLISTS_RESOURCES} | 615 ${MODALITY_WORKLISTS_RESOURCES} |
565 ) | 616 ) |
566 | 617 |
567 target_link_libraries(ModalityWorklists ThirdPartyPlugins) | 618 target_link_libraries(ModalityWorklists PluginsFramework) |
568 | 619 |
569 set_target_properties( | 620 set_target_properties( |
570 ModalityWorklists PROPERTIES | 621 ModalityWorklists PROPERTIES |
571 VERSION ${ORTHANC_VERSION} | 622 VERSION ${ORTHANC_VERSION} |
572 SOVERSION ${ORTHANC_VERSION} | 623 SOVERSION ${ORTHANC_VERSION} |
578 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | 629 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux |
579 ) | 630 ) |
580 endif() | 631 endif() |
581 | 632 |
582 | 633 |
583 if (ENABLE_PLUGINS AND (BUILD_DELAYED_DELETION OR BUILD_CONNECTIVITY_CHECKS)) | |
584 include(ExternalProject) | |
585 endif() | |
586 | |
587 | 634 |
588 ##################################################################### | 635 ##################################################################### |
589 ## Build the "ConnectivityChecks" plugin | 636 ## Build the "ConnectivityChecks" plugin |
590 ##################################################################### | 637 ##################################################################### |
591 | 638 |
592 if (ENABLE_PLUGINS AND BUILD_CONNECTIVITY_CHECKS) | 639 if (ENABLE_PLUGINS AND BUILD_CONNECTIVITY_CHECKS) |
593 | 640 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
594 set(ConnectivityChecksFlags) | 641 execute_process( |
595 | 642 COMMAND |
596 if (CMAKE_TOOLCHAIN_FILE) | 643 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py |
597 # Take absolute path to the toolchain | 644 ${ORTHANC_VERSION} ConnectivityChecks ConnectivityChecks.dll "Orthanc plugin to show connectivity status" |
598 get_filename_component(TMP ${CMAKE_TOOLCHAIN_FILE} REALPATH BASE ${CMAKE_SOURCE_DIR}) | 645 ERROR_VARIABLE Failure |
599 list(APPEND ConnectivityChecksFlags -DCMAKE_TOOLCHAIN_FILE=${TMP}) | 646 OUTPUT_FILE ${AUTOGENERATED_DIR}/ConnectivityChecks.rc |
647 ) | |
648 | |
649 if (Failure) | |
650 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
651 endif() | |
652 | |
653 list(APPEND CONNECTIVITY_CHECKS_RESOURCES ${AUTOGENERATED_DIR}/ConnectivityChecks.rc) | |
600 endif() | 654 endif() |
601 | 655 |
602 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") | 656 include(${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/JavaScriptLibraries.cmake) |
603 list(APPEND ConnectivityChecksFlags | 657 |
604 -DLSB_CC=${CMAKE_LSB_CC} | 658 EmbedResources( |
605 -DLSB_CXX=${CMAKE_LSB_CXX} | 659 --target=ConnectivityChecksResources |
660 --framework-path=${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources | |
661 WEB_RESOURCES ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/WebResources | |
662 LIBRARIES ${CONNECTIVITY_CHECKS_JAVASCRIPT_DIR} | |
663 ) | |
664 | |
665 set_source_files_properties( | |
666 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/Plugin.cpp | |
667 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_PLUGIN_NAME=\"connectivity-checks\";ORTHANC_PLUGIN_VERSION=\"${ORTHANC_VERSION}\"" | |
668 ) | |
669 | |
670 add_library(ConnectivityChecks SHARED | |
671 ${AUTOGENERATED_DIR}/ConnectivityChecksResources.cpp | |
672 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/Plugin.cpp | |
673 ${CONNECTIVITY_CHECKS_RESOURCES} | |
674 ) | |
675 | |
676 target_link_libraries(ConnectivityChecks PluginsFramework) | |
677 | |
678 set_target_properties( | |
679 ConnectivityChecks PROPERTIES | |
680 VERSION ${ORTHANC_VERSION} | |
681 SOVERSION ${ORTHANC_VERSION} | |
682 ) | |
683 | |
684 install( | |
685 TARGETS ConnectivityChecks | |
686 RUNTIME DESTINATION lib # Destination for Windows | |
687 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux | |
688 ) | |
689 endif() | |
690 | |
691 | |
692 ##################################################################### | |
693 ## Build the "DelayedDeletion" plugin | |
694 ##################################################################### | |
695 | |
696 if (ENABLE_PLUGINS AND BUILD_DELAYED_DELETION) | |
697 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
698 execute_process( | |
699 COMMAND | |
700 ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/WindowsResources.py | |
701 ${ORTHANC_VERSION} DelayedDeletion DelayedDeletion.dll "Orthanc plugin to delay deletion of files" | |
702 ERROR_VARIABLE Failure | |
703 OUTPUT_FILE ${AUTOGENERATED_DIR}/DelayedDeletion.rc | |
606 ) | 704 ) |
705 | |
706 if (Failure) | |
707 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
708 endif() | |
709 | |
710 list(APPEND DELAYED_DELETION_RESOURCES ${AUTOGENERATED_DIR}/DelayedDeletion.rc) | |
607 endif() | 711 endif() |
608 | 712 |
609 externalproject_add(ConnectivityChecks | 713 set_source_files_properties( |
610 SOURCE_DIR "${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks" | 714 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/Plugin.cpp |
611 | 715 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_PLUGIN_NAME=\"delayed-deletion\";ORTHANC_PLUGIN_VERSION=\"${ORTHANC_VERSION}\"" |
612 # We explicitly provide a build directory, in order to avoid paths | 716 ) |
613 # that are too long on our Visual Studio 2008 CIS | 717 |
614 BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ConnectivityChecks-build" | 718 add_library(DelayedDeletion SHARED |
615 | 719 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsEnumerations.cpp |
616 # this helps triggering build when changing the external project | 720 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.cpp |
617 BUILD_ALWAYS 1 | 721 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/Plugin.cpp |
618 | 722 ${DELAYED_DELETION_RESOURCES} |
619 CMAKE_ARGS | 723 ) |
620 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} | 724 |
621 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR} | 725 target_link_libraries(DelayedDeletion PluginsFramework ${DCMTK_LIBRARIES}) |
622 -DPLUGIN_VERSION=${ORTHANC_VERSION} | 726 |
623 -DSTATIC_BUILD=${STATIC_BUILD} | 727 set_target_properties( |
624 -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS} | 728 DelayedDeletion PROPERTIES |
625 -DUSE_SYSTEM_BOOST=${USE_SYSTEM_BOOST} | 729 VERSION ${ORTHANC_VERSION} |
626 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP} | 730 SOVERSION ${ORTHANC_VERSION} |
627 -DUSE_LEGACY_BOOST=${USE_LEGACY_BOOST} | 731 ) |
628 ${ConnectivityChecksFlags} | 732 |
629 | 733 install( |
630 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | 734 TARGETS DelayedDeletion |
631 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} | 735 RUNTIME DESTINATION lib # Destination for Windows |
632 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | 736 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux |
633 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | 737 ) |
634 -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} | |
635 -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} | |
636 | |
637 INSTALL_COMMAND "" | |
638 ) | |
639 | |
640 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
641 if (MSVC) | |
642 set(Prefix "") | |
643 else() | |
644 set(Prefix "lib") # MinGW | |
645 endif() | |
646 | |
647 install(FILES | |
648 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}ConnectivityChecks.dll | |
649 DESTINATION "lib") | |
650 else() | |
651 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) | |
652 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) | |
653 install(FILES | |
654 ${CMAKE_CURRENT_BINARY_DIR}/ConnectivityChecks-build/${Prefix}ConnectivityChecks${Suffix} | |
655 ${CMAKE_CURRENT_BINARY_DIR}/ConnectivityChecks-build/${Prefix}ConnectivityChecks${Suffix}.${ORTHANC_VERSION} | |
656 DESTINATION "share/orthanc/plugins") | |
657 endif() | |
658 endif() | |
659 | |
660 | |
661 ##################################################################### | |
662 ## Build the "DelayedDeletion" plugin | |
663 ##################################################################### | |
664 | |
665 if (ENABLE_PLUGINS AND BUILD_DELAYED_DELETION) | |
666 | |
667 set(DelayedDeletionFlags) | |
668 | |
669 if (CMAKE_TOOLCHAIN_FILE) | |
670 # Take absolute path to the toolchain | |
671 get_filename_component(TMP ${CMAKE_TOOLCHAIN_FILE} REALPATH BASE ${CMAKE_SOURCE_DIR}) | |
672 list(APPEND DelayedDeletionFlags -DCMAKE_TOOLCHAIN_FILE=${TMP}) | |
673 endif() | |
674 | |
675 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase") | |
676 list(APPEND DelayedDeletionFlags | |
677 -DLSB_CC=${CMAKE_LSB_CC} | |
678 -DLSB_CXX=${CMAKE_LSB_CXX} | |
679 ) | |
680 endif() | |
681 | |
682 externalproject_add(DelayedDeletion | |
683 SOURCE_DIR "${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion" | |
684 | |
685 # We explicitly provide a build directory, in order to avoid paths | |
686 # that are too long on our Visual Studio 2008 CIS | |
687 BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/DelayedDeletion-build" | |
688 | |
689 # this helps triggering build when changing the external project | |
690 BUILD_ALWAYS 1 | |
691 | |
692 CMAKE_ARGS | |
693 -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} | |
694 -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR} | |
695 -DPLUGIN_VERSION=${ORTHANC_VERSION} | |
696 -DSTATIC_BUILD=${STATIC_BUILD} | |
697 -DALLOW_DOWNLOADS=${ALLOW_DOWNLOADS} | |
698 -DUSE_SYSTEM_BOOST=${USE_SYSTEM_BOOST} | |
699 -DUSE_LEGACY_JSONCPP=${USE_LEGACY_JSONCPP} | |
700 -DUSE_LEGACY_BOOST=${USE_LEGACY_BOOST} | |
701 ${DelayedDeletionFlags} | |
702 | |
703 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | |
704 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} | |
705 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | |
706 -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | |
707 -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} | |
708 -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} | |
709 | |
710 INSTALL_COMMAND "" | |
711 ) | |
712 | |
713 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | |
714 if (MSVC) | |
715 set(Prefix "") | |
716 else() | |
717 set(Prefix "lib") # MinGW | |
718 endif() | |
719 | |
720 install(FILES | |
721 ${CMAKE_CURRENT_BINARY_DIR}/${Prefix}DelayedDeletion.dll | |
722 DESTINATION "lib") | |
723 else() | |
724 list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix) | |
725 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 Suffix) | |
726 install(FILES | |
727 ${CMAKE_CURRENT_BINARY_DIR}/DelayedDeletion-build/${Prefix}DelayedDeletion${Suffix} | |
728 ${CMAKE_CURRENT_BINARY_DIR}/DelayedDeletion-build/${Prefix}DelayedDeletion${Suffix}.${ORTHANC_VERSION} | |
729 DESTINATION "share/orthanc/plugins") | |
730 endif() | |
731 endif() | 738 endif() |
732 | 739 |
733 | 740 |
734 ##################################################################### | 741 ##################################################################### |
735 ## Build the "Housekeeper" plugin | 742 ## Build the "Housekeeper" plugin |
750 endif() | 757 endif() |
751 | 758 |
752 list(APPEND HOUSEKEEPER_RESOURCES ${AUTOGENERATED_DIR}/Housekeeper.rc) | 759 list(APPEND HOUSEKEEPER_RESOURCES ${AUTOGENERATED_DIR}/Housekeeper.rc) |
753 endif() | 760 endif() |
754 | 761 |
762 set_source_files_properties( | |
763 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp | |
764 PROPERTIES COMPILE_DEFINITIONS "HOUSEKEEPER_VERSION=\"${ORTHANC_VERSION}\"" | |
765 ) | |
766 | |
755 add_library(Housekeeper SHARED | 767 add_library(Housekeeper SHARED |
756 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp | 768 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp |
757 ${HOUSEKEEPER_RESOURCES} | 769 ${HOUSEKEEPER_RESOURCES} |
758 ) | 770 ) |
759 | 771 |
760 target_link_libraries(Housekeeper | 772 target_link_libraries(Housekeeper |
761 ThirdPartyPlugins | 773 PluginsFramework |
762 ) | 774 ) |
763 | 775 |
764 set_target_properties( | 776 set_target_properties( |
765 Housekeeper PROPERTIES | 777 Housekeeper PROPERTIES |
766 VERSION ${ORTHANC_VERSION} | 778 VERSION ${ORTHANC_VERSION} |