# HG changeset patch # User Sebastien Jodogne # Date 1454927619 -3600 # Node ID 41e402cd7b3a133cd7e5de5a89561b70d38b24dc # Parent 2f415526fdcdd1fa39dcada8d52966ddfbdb1cec do not generate RC files for non-Windows builds diff -r 2f415526fdcd -r 41e402cd7b3a CMakeLists.txt --- 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( diff -r 2f415526fdcd -r 41e402cd7b3a OrthancServer/ParsedDicomFile.cpp --- 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(*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);