Mercurial > hg > orthanc
comparison OrthancServer/CMakeLists.txt @ 5263:ae3f29be5ca5
fix compatibility with visual studio precompiled headers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 12 Apr 2023 17:38:44 +0200 |
parents | bf304ee8dd80 |
children | 0e8dfba67ac9 |
comparison
equal
deleted
inserted
replaced
5262:bf304ee8dd80 | 5263:ae3f29be5ca5 |
---|---|
490 ##################################################################### | 490 ##################################################################### |
491 | 491 |
492 if (ENABLE_PLUGINS AND | 492 if (ENABLE_PLUGINS AND |
493 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS OR BUILD_HOUSEKEEPER OR | 493 (BUILD_SERVE_FOLDERS OR BUILD_MODALITY_WORKLISTS OR BUILD_HOUSEKEEPER OR |
494 BUILD_DELAYED_DELETION)) | 494 BUILD_DELAYED_DELETION)) |
495 set(PLUGINS_FRAMEWORK_SOURCES | 495 set(PLUGINS_DEPENDENCIES_SOURCES |
496 ${BOOST_SOURCES} | 496 ${BOOST_SOURCES} |
497 ${JSONCPP_SOURCES} | 497 ${JSONCPP_SOURCES} |
498 ${LIBICONV_SOURCES} | 498 ${LIBICONV_SOURCES} |
499 ${LIBICU_SOURCES} | 499 ${LIBICU_SOURCES} |
500 ${PUGIXML_SOURCES} | |
501 ${UUID_SOURCES} | |
502 ${ZLIB_SOURCES} | |
503 | |
504 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/ThirdParty/base64/base64.cpp | |
505 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/ThirdParty/md5/md5.c | |
500 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp | 506 Plugins/Samples/Common/OrthancPluginCppWrapper.cpp |
501 ) | 507 ) |
502 | 508 |
503 if (BUILD_DELAYED_DELETION) | 509 if (BUILD_DELAYED_DELETION) |
504 list(APPEND PLUGINS_FRAMEWORK_SOURCES | 510 list(APPEND PLUGINS_DEPENDENCIES_SOURCES |
505 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/ThirdParty/base64/base64.cpp | |
506 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Resources/ThirdParty/md5/md5.c | |
507 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/ChunkedBuffer.cpp | |
508 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/DeflateBaseCompressor.cpp | |
509 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/GzipCompressor.cpp | |
510 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/HierarchicalZipWriter.cpp | |
511 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/IBufferCompressor.cpp | |
512 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/ZipReader.cpp | |
513 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/ZipWriter.cpp | |
514 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Compression/ZlibCompressor.cpp | |
515 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/DicomFormat/DicomTag.cpp | |
516 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Enumerations.cpp | |
517 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp | |
518 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Logging.cpp | |
519 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/MultiThreading/SharedMessageQueue.cpp | |
520 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/OrthancException.cpp | |
521 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/Connection.cpp | |
522 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/FunctionContext.cpp | |
523 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/Statement.cpp | |
524 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/StatementId.cpp | |
525 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/StatementReference.cpp | |
526 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SQLite/Transaction.cpp | |
527 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/StringMemoryBuffer.cpp | |
528 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/SystemToolbox.cpp | |
529 ${CMAKE_SOURCE_DIR}/../OrthancFramework/Sources/Toolbox.cpp | |
530 ${DCMTK_SOURCES} | 511 ${DCMTK_SOURCES} |
531 ${PUGIXML_SOURCES} | |
532 ${UUID_SOURCES} | |
533 ${ZLIB_SOURCES} | |
534 ${SQLITE_SOURCES} | 512 ${SQLITE_SOURCES} |
535 ) | 513 ) |
536 endif() | 514 endif() |
537 | 515 |
538 add_library(PluginsFramework STATIC | 516 add_library(PluginsDependencies STATIC |
539 ${PLUGINS_FRAMEWORK_SOURCES} | 517 ${PLUGINS_DEPENDENCIES_SOURCES} |
540 ) | |
541 | |
542 # Remove the dependency upon ICU in plugins, as this greatly | |
543 # increase the size of the resulting binaries, since they must | |
544 # embed the ICU dictionary. | |
545 set_target_properties( | |
546 PluginsFramework | |
547 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_ENABLE_ICU=0" | |
548 ) | 518 ) |
549 | 519 |
550 # Add the "-fPIC" option as this static library must be embedded | 520 # Add the "-fPIC" option as this static library must be embedded |
551 # inside shared libraries (important on UNIX) | 521 # inside shared libraries (important on UNIX) |
552 set_target_properties( | 522 set_target_properties( |
553 PluginsFramework | 523 PluginsDependencies |
554 PROPERTIES POSITION_INDEPENDENT_CODE ON | 524 PROPERTIES POSITION_INDEPENDENT_CODE ON |
555 ) | 525 ) |
556 endif() | 526 endif() |
557 | 527 |
558 | 528 |
585 add_library(ServeFolders SHARED | 555 add_library(ServeFolders SHARED |
586 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp | 556 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ServeFolders/Plugin.cpp |
587 ${SERVE_FOLDERS_RESOURCES} | 557 ${SERVE_FOLDERS_RESOURCES} |
588 ) | 558 ) |
589 | 559 |
590 target_link_libraries(ServeFolders PluginsFramework) | 560 target_link_libraries(ServeFolders PluginsDependencies) |
591 | 561 |
592 set_target_properties( | 562 set_target_properties( |
593 ServeFolders PROPERTIES | 563 ServeFolders PROPERTIES |
594 VERSION ${ORTHANC_VERSION} | 564 VERSION ${ORTHANC_VERSION} |
595 SOVERSION ${ORTHANC_VERSION} | 565 SOVERSION ${ORTHANC_VERSION} |
633 add_library(ModalityWorklists SHARED | 603 add_library(ModalityWorklists SHARED |
634 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp | 604 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ModalityWorklists/Plugin.cpp |
635 ${MODALITY_WORKLISTS_RESOURCES} | 605 ${MODALITY_WORKLISTS_RESOURCES} |
636 ) | 606 ) |
637 | 607 |
638 target_link_libraries(ModalityWorklists PluginsFramework) | 608 target_link_libraries(ModalityWorklists PluginsDependencies) |
639 | 609 |
640 set_target_properties( | 610 set_target_properties( |
641 ModalityWorklists PROPERTIES | 611 ModalityWorklists PROPERTIES |
642 VERSION ${ORTHANC_VERSION} | 612 VERSION ${ORTHANC_VERSION} |
643 SOVERSION ${ORTHANC_VERSION} | 613 SOVERSION ${ORTHANC_VERSION} |
685 set_source_files_properties( | 655 set_source_files_properties( |
686 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/Plugin.cpp | 656 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/Plugin.cpp |
687 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_PLUGIN_NAME=\"connectivity-checks\";ORTHANC_PLUGIN_VERSION=\"${ORTHANC_VERSION}\"" | 657 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_PLUGIN_NAME=\"connectivity-checks\";ORTHANC_PLUGIN_VERSION=\"${ORTHANC_VERSION}\"" |
688 ) | 658 ) |
689 | 659 |
660 # The "OrthancFrameworkDependencies.cpp" file is used to bypass the | |
661 # precompiled headers if compiling with Visual Studio | |
690 add_library(ConnectivityChecks SHARED | 662 add_library(ConnectivityChecks SHARED |
691 ${AUTOGENERATED_DIR}/ConnectivityChecksResources.cpp | 663 ${AUTOGENERATED_DIR}/ConnectivityChecksResources.cpp |
692 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/Plugin.cpp | 664 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/Plugin.cpp |
665 ${CMAKE_SOURCE_DIR}/Plugins/Samples/ConnectivityChecks/OrthancFrameworkDependencies.cpp | |
693 ${CONNECTIVITY_CHECKS_RESOURCES} | 666 ${CONNECTIVITY_CHECKS_RESOURCES} |
694 ) | 667 ) |
695 | 668 |
696 target_link_libraries(ConnectivityChecks PluginsFramework) | 669 target_link_libraries(ConnectivityChecks PluginsDependencies) |
697 | 670 |
698 set_target_properties( | 671 set_target_properties( |
699 ConnectivityChecks PROPERTIES | 672 ConnectivityChecks PROPERTIES |
700 VERSION ${ORTHANC_VERSION} | 673 VERSION ${ORTHANC_VERSION} |
701 SOVERSION ${ORTHANC_VERSION} | 674 SOVERSION ${ORTHANC_VERSION} |
732 | 705 |
733 set_source_files_properties( | 706 set_source_files_properties( |
734 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/Plugin.cpp | 707 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/Plugin.cpp |
735 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_PLUGIN_NAME=\"delayed-deletion\";ORTHANC_PLUGIN_VERSION=\"${ORTHANC_VERSION}\"" | 708 PROPERTIES COMPILE_DEFINITIONS "ORTHANC_PLUGIN_NAME=\"delayed-deletion\";ORTHANC_PLUGIN_VERSION=\"${ORTHANC_VERSION}\"" |
736 ) | 709 ) |
737 | 710 |
711 # The "OrthancFrameworkDependencies.cpp" file is used to bypass the | |
712 # precompiled headers if compiling with Visual Studio | |
738 add_library(DelayedDeletion SHARED | 713 add_library(DelayedDeletion SHARED |
739 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsEnumerations.cpp | 714 ${CMAKE_SOURCE_DIR}/Plugins/Engine/PluginsEnumerations.cpp |
740 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.cpp | 715 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/PendingDeletionsDatabase.cpp |
741 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/Plugin.cpp | 716 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/Plugin.cpp |
717 ${CMAKE_SOURCE_DIR}/Plugins/Samples/DelayedDeletion/OrthancFrameworkDependencies.cpp | |
742 ${DELAYED_DELETION_RESOURCES} | 718 ${DELAYED_DELETION_RESOURCES} |
743 ) | 719 ) |
744 | 720 |
745 target_link_libraries(DelayedDeletion PluginsFramework ${DCMTK_LIBRARIES}) | 721 target_link_libraries(DelayedDeletion PluginsDependencies ${DCMTK_LIBRARIES}) |
746 | 722 |
747 set_target_properties( | 723 set_target_properties( |
748 DelayedDeletion PROPERTIES | 724 DelayedDeletion PROPERTIES |
749 VERSION ${ORTHANC_VERSION} | 725 VERSION ${ORTHANC_VERSION} |
750 SOVERSION ${ORTHANC_VERSION} | 726 SOVERSION ${ORTHANC_VERSION} |
787 add_library(Housekeeper SHARED | 763 add_library(Housekeeper SHARED |
788 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp | 764 ${CMAKE_SOURCE_DIR}/Plugins/Samples/Housekeeper/Plugin.cpp |
789 ${HOUSEKEEPER_RESOURCES} | 765 ${HOUSEKEEPER_RESOURCES} |
790 ) | 766 ) |
791 | 767 |
792 target_link_libraries(Housekeeper | 768 target_link_libraries(Housekeeper PluginsDependencies) |
793 PluginsFramework | |
794 ) | |
795 | 769 |
796 set_target_properties( | 770 set_target_properties( |
797 Housekeeper PROPERTIES | 771 Housekeeper PROPERTIES |
798 VERSION ${ORTHANC_VERSION} | 772 VERSION ${ORTHANC_VERSION} |
799 SOVERSION ${ORTHANC_VERSION} | 773 SOVERSION ${ORTHANC_VERSION} |