Mercurial > hg > orthanc
changeset 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 | 2f415526fdcd |
children | 501769757bf9 |
files | CMakeLists.txt OrthancServer/ParsedDicomFile.cpp |
diffstat | 2 files changed, 31 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Sat Feb 06 12:38:57 2016 +0100 +++ b/CMakeLists.txt Mon Feb 08 11:33:39 2016 +0100 @@ -335,7 +335,7 @@ ) endif() -if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") execute_process( COMMAND ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py @@ -474,17 +474,21 @@ ##################################################################### if (ENABLE_PLUGINS AND BUILD_SERVE_FOLDERS) - execute_process( - COMMAND - ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py - ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" - ERROR_VARIABLE Failure - OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc - ) + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py + ${ORTHANC_VERSION} ServeFolders ServeFolders.dll "Orthanc plugin to serve additional folders" + ERROR_VARIABLE Failure + OUTPUT_FILE ${AUTOGENERATED_DIR}/ServeFolders.rc + ) - if (Failure) - message(FATAL_ERROR "Error while computing the version information: ${Failure}") - endif() + if (Failure) + message(FATAL_ERROR "Error while computing the version information: ${Failure}") + endif() + + list(APPEND SERVE_FOLDERS_RESOURCES ${AUTOGENERATED_DIR}/ServeFolders.rc) + endif() add_definitions(-DSERVE_FOLDERS_VERSION="${ORTHANC_VERSION}") @@ -494,7 +498,7 @@ ${BOOST_SOURCES} ${JSONCPP_SOURCES} Plugins/Samples/ServeFolders/Plugin.cpp - ${AUTOGENERATED_DIR}/ServeFolders.rc + ${SERVE_FOLDERS_RESOURCES} ) set_target_properties( @@ -517,16 +521,20 @@ ##################################################################### if (ENABLE_PLUGINS AND BUILD_MODALITY_WORKLISTS) - execute_process( - COMMAND - ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py - ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists" - ERROR_VARIABLE Failure - OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc - ) + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py + ${ORTHANC_VERSION} ModalityWorklists ModalityWorklists.dll "Sample Orthanc plugin to serve modality worklists" + ERROR_VARIABLE Failure + OUTPUT_FILE ${AUTOGENERATED_DIR}/ModalityWorklists.rc + ) - if (Failure) - message(FATAL_ERROR "Error while computing the version information: ${Failure}") + if (Failure) + message(FATAL_ERROR "Error while computing the version information: ${Failure}") + endif() + + list(APPEND MODALITY_WORKLISTS_RESOURCES ${AUTOGENERATED_DIR}/ModalityWorklists.rc) endif() add_definitions(-DMODALITY_WORKLISTS_VERSION="${ORTHANC_VERSION}") @@ -537,7 +545,7 @@ ${BOOST_SOURCES} ${JSONCPP_SOURCES} Plugins/Samples/ModalityWorklists/Plugin.cpp - ${AUTOGENERATED_DIR}/ModalityWorklists.rc + ${MODALITY_WORKLISTS_RESOURCES} ) set_target_properties(
--- a/OrthancServer/ParsedDicomFile.cpp Sat Feb 06 12:38:57 2016 +0100 +++ b/OrthancServer/ParsedDicomFile.cpp Mon Feb 08 11:33:39 2016 +0100 @@ -362,7 +362,7 @@ DcmPixelData& pixelData = dynamic_cast<DcmPixelData&>(*element); if (blockUri == NULL) { - // The user asks how many blocks are presents in this pixel data + // The user asks how many blocks are present in this pixel data unsigned int blocks = GetPixelDataBlockCount(pixelData, transferSyntax); Json::Value result(Json::arrayValue);