changeset 20:a2c57c351627 OrthancGoogleCloudPlatform-1.0

add windows resources
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Jun 2019 15:53:09 +0200
parents e7ea54d8c16c
children 17f371dc120d
files CMakeLists.txt
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Wed Jun 26 14:43:49 2019 +0200
+++ b/CMakeLists.txt	Wed Jun 26 15:53:09 2019 +0200
@@ -79,6 +79,24 @@
   ${ORTHANC_ROOT}
   )
 
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+  execute_process(
+    COMMAND 
+    ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
+    ${GCP_PLUGIN_VERSION} "Google Cloud Platform plugin" OrthancGoogleCloudPlatform.dll
+    "Plugin to access Google Cloud Platform from Orthanc"
+    ERROR_VARIABLE Failure
+    OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/Version.rc
+    )
+
+  if (Failure)
+    message(FATAL_ERROR "Error while computing the version information: ${Failure}")
+  endif()
+
+  set(GCP_RESOURCES  ${CMAKE_CURRENT_BINARY_DIR}/Version.rc)
+endif()
+
+
 if (ON)
   # Redefine the list of Orthanc sources, removing unused items, in
   # order to reduce the number of files and speed up the builds
@@ -95,6 +113,7 @@
 
 add_library(OrthancGoogleCloudPlatform SHARED
   ${ORTHANC_ROOT}/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
+  ${GCP_RESOURCES}
   Plugin/GoogleAccount.cpp
   Plugin/GoogleConfiguration.cpp
   Plugin/GoogleUpdater.cpp