Mercurial > hg > orthanc
comparison CMakeLists.txt @ 1913:41e402cd7b3a
do not generate RC files for non-Windows builds
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Feb 2016 11:33:39 +0100 |
parents | 7110e2881dc0 |
children | 501769757bf9 |
comparison
equal
deleted
inserted
replaced
1912:2f415526fdcd | 1913:41e402cd7b3a |
---|---|
333 EmbedResources( | 333 EmbedResources( |
334 ${ORTHANC_EMBEDDED_FILES} | 334 ${ORTHANC_EMBEDDED_FILES} |
335 ) | 335 ) |
336 endif() | 336 endif() |
337 | 337 |
338 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 338 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
339 execute_process( | 339 execute_process( |
340 COMMAND | 340 COMMAND |
341 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | 341 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py |
342 ${ORTHANC_VERSION} Orthanc Orthanc.exe "Lightweight, RESTful DICOM server for medical imaging" | 342 ${ORTHANC_VERSION} Orthanc Orthanc.exe "Lightweight, RESTful DICOM server for medical imaging" |
343 ERROR_VARIABLE Failure | 343 ERROR_VARIABLE Failure |
472 ##################################################################### | 472 ##################################################################### |
473 ## Build the "ServeFolders" plugin | 473 ## Build the "ServeFolders" plugin |
474 ##################################################################### | 474 ##################################################################### |
475 | 475 |
476 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS) | 476 if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS) |
477 execute_process( | 477 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
478 COMMAND | 478 execute_process( |
479 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | 479 COMMAND |
480 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" | 480 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py |
481 ERROR_VARIABLE Failure | 481 ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" |
482 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc | 482 ERROR_VARIABLE Failure |
483 ) | 483 OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc |
484 | 484 ) |
485 if (Failure) | 485 |
486 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | 486 if (Failure) |
487 endif() | 487 message(FATAL_ERROR "Error while computing the version information: ${Failure}") |
488 endif() | |
489 | |
490 list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) | |
491 endif() | |
488 | 492 |
489 add_definitions(-DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}") | 493 add_definitions(-DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}") |
490 | 494 |
491 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) | 495 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) |
492 | 496 |
493 add_library(ServeFolders SHARED | 497 add_library(ServeFolders SHARED |
494 ${BOOST_SOURCES} | 498 ${BOOST_SOURCES} |
495 ${JSONCPP_SOURCES} | 499 ${JSONCPP_SOURCES} |
496 Plugins/Samples/ServeFolders/Plugin.cpp | 500 Plugins/Samples/ServeFolders/Plugin.cpp |
497 ${AUTOGENERATED_DIR}/ServeFolders.rc | 501 ${SERVE_FOLDERS_RESOURCES} |
498 ) | 502 ) |
499 | 503 |
500 set_target_properties( | 504 set_target_properties( |
501 ServeFolders PROPERTIES | 505 ServeFolders PROPERTIES |
502 VERSION ${ORTHANC_VERSION} | 506 VERSION ${ORTHANC_VERSION} |
515 ##################################################################### | 519 ##################################################################### |
516 ## Build the "ModalityWorklists" plugin | 520 ## Build the "ModalityWorklists" plugin |
517 ##################################################################### | 521 ##################################################################### |
518 | 522 |
519 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS) | 523 if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS) |
520 execute_process( | 524 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
521 COMMAND | 525 execute_process( |
522 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py | 526 COMMAND |
523 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists" | 527 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py |
524 ERROR_VARIABLE Failure | 528 ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists" |
525 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc | 529 ERROR_VARIABLE Failure |
526 ) | 530 OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc |
527 | 531 ) |
528 if (Failure) | 532 |
529 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | 533 if (Failure) |
534 message(FATAL_ERROR "Error while computing the version information: ${Failure}") | |
535 endif() | |
536 | |
537 list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) | |
530 endif() | 538 endif() |
531 | 539 |
532 add_definitions(-DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}") | 540 add_definitions(-DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}") |
533 | 541 |
534 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) | 542 include_directories(${CMAKE_SOURCE_DIR}/Plugins/Include) |
535 | 543 |
536 add_library(ModalityWorklists SHARED | 544 add_library(ModalityWorklists SHARED |
537 ${BOOST_SOURCES} | 545 ${BOOST_SOURCES} |
538 ${JSONCPP_SOURCES} | 546 ${JSONCPP_SOURCES} |
539 Plugins/Samples/ModalityWorklists/Plugin.cpp | 547 Plugins/Samples/ModalityWorklists/Plugin.cpp |
540 ${AUTOGENERATED_DIR}/ModalityWorklists.rc | 548 ${MODALITY_WORKLISTS_RESOURCES} |
541 ) | 549 ) |
542 | 550 |
543 set_target_properties( | 551 set_target_properties( |
544 ModalityWorklists PROPERTIES | 552 ModalityWorklists PROPERTIES |
545 VERSION ${ORTHANC_VERSION} | 553 VERSION ${ORTHANC_VERSION} |