# HG changeset patch # User Sebastien Jodogne # Date 1561557189 -7200 # Node ID a2c57c351627bf3d7eb46ba53d294780811c0c2f # Parent e7ea54d8c16c5782882dcfb3522863b0e941dc98 add windows resources diff -r e7ea54d8c16c -r a2c57c351627 CMakeLists.txt --- 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