# HG changeset patch # User Sebastien Jodogne # Date 1606920213 -3600 # Node ID 2f72db02be444df9277036ca2d8d74145e9a2a4d # Parent 816e1634f2215acc069cd76475197ea42fbb6412 added missing version information in Windows binaries diff -r 816e1634f221 -r 2f72db02be44 Applications/StoneWebViewer/Plugin/CMakeLists.txt --- a/Applications/StoneWebViewer/Plugin/CMakeLists.txt Wed Dec 02 13:19:15 2020 +0100 +++ b/Applications/StoneWebViewer/Plugin/CMakeLists.txt Wed Dec 02 15:43:33 2020 +0100 @@ -76,6 +76,25 @@ ) +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lws2_32") + + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py + ${STONE_WEB_VIEWER_VERSION} "StoneWebViewer" StoneWebViewer.dll "Stone Web viewer for medical imaging" + ERROR_VARIABLE Failure + OUTPUT_FILE ${AUTOGENERATED_DIR}/Version.rc + ) + + if (Failure) + message(FATAL_ERROR "Error while computing the version information: ${Failure}") + endif() + + list(APPEND AUTOGENERATED_SOURCES ${AUTOGENERATED_DIR}/Version.rc) +endif() + + EmbedResources( --no-upcase-check # For 2017-11-13-OpenSans-Regular.ttf