comparison Aws/CMakeLists.txt @ 205:70caa95a9072 2.4.0

added Windows resources to the DLL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Jun 2024 16:16:24 +0200
parents bb19f1ed9cd9
children afc642ccb99c
comparison
equal deleted inserted replaced
202:bb19f1ed9cd9 205:70caa95a9072
116 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK") 116 message(FATAL_ERROR "Please install the headers of the Orthanc plugins SDK")
117 endif() 117 endif()
118 endif() 118 endif()
119 119
120 120
121 if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
122 execute_process(
123 COMMAND
124 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py
125 ${PLUGIN_VERSION} "AWS S3 plugin" OrthancAwsS3Storage.dll
126 "AWS S3 plugin for Orthanc"
127 ERROR_VARIABLE Failure
128 OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/Version.rc
129 )
130
131 if (Failure)
132 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
133 endif()
134
135 list(APPEND AUTOGENERATED_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/Version.rc)
136 endif()
137
138
121 add_definitions( 139 add_definitions(
122 -DHAS_ORTHANC_EXCEPTION=1 140 -DHAS_ORTHANC_EXCEPTION=1
123 -DORTHANC_ENABLE_LOGGING=1 141 -DORTHANC_ENABLE_LOGGING=1
124 -DAWS_STORAGE_PLUGIN=1 142 -DAWS_STORAGE_PLUGIN=1
125 -DPLUGIN_VERSION="${PLUGIN_VERSION}" 143 -DPLUGIN_VERSION="${PLUGIN_VERSION}"
166 AwsS3StoragePlugin.cpp 184 AwsS3StoragePlugin.cpp
167 AwsS3StoragePlugin.h 185 AwsS3StoragePlugin.h
168 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp 186 ${CMAKE_SOURCE_DIR}/../Common/StoragePlugin.cpp
169 187
170 ${COMMON_SOURCES} 188 ${COMMON_SOURCES}
189 ${AUTOGENERATED_SOURCES}
171 ) 190 )
172 191
173 set_target_properties(OrthancAwsS3Storage PROPERTIES 192 set_target_properties(OrthancAwsS3Storage PROPERTIES
174 VERSION ${PLUGIN_VERSION} 193 VERSION ${PLUGIN_VERSION}
175 SOVERSION ${PLUGIN_VERSION} 194 SOVERSION ${PLUGIN_VERSION}