changeset 1733:2f72db02be44 StoneWebViewer-1.0

added missing version information in Windows binaries
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Dec 2020 15:43:33 +0100
parents 816e1634f221
children 940575fba346 67c1f4d9a0dd
files Applications/StoneWebViewer/Plugin/CMakeLists.txt
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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