# HG changeset patch # User Sebastien Jodogne # Date 1531765870 -7200 # Node ID bc979149e1383a93c0502f2c68eddd3f3ef38fe6 # Parent 23761c478d8642aa4ec77370960804256340ea9a dll versioning diff -r 23761c478d86 -r bc979149e138 MySQL/CMakeLists.txt --- a/MySQL/CMakeLists.txt Mon Jul 16 20:17:43 2018 +0200 +++ b/MySQL/CMakeLists.txt Mon Jul 16 20:31:10 2018 +0200 @@ -17,11 +17,45 @@ include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) + +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py + ${ORTHANC_PLUGIN_VERSION} "MySQL storage area plugin" OrthancMySQLStorage.dll + "MySQL as a database back-end to Orthanc (storage area)" + ERROR_VARIABLE Failure + OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc + ) + + if (Failure) + message(FATAL_ERROR "Error while computing the version information: ${Failure}") + endif() + + execute_process( + COMMAND + ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py + ${ORTHANC_PLUGIN_VERSION} "MySQL index plugin" OrthancMySQLIndex.dll + "MySQL as a database back-end to Orthanc (index)" + ERROR_VARIABLE Failure + OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc + ) + + if (Failure) + message(FATAL_ERROR "Error while computing the version information: ${Failure}") + endif() + + set(INDEX_RESOURCES ${AUTOGENERATED_DIR}/IndexVersion.rc) + set(STORAGE_RESOURCES ${AUTOGENERATED_DIR}/StorageVersion.rc) +endif() + + EmbedResources( MYSQL_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql ) add_library(OrthancMySQLIndex SHARED + ${INDEX_RESOURCES} ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp Plugins/IndexPlugin.cpp Plugins/MySQLIndex.cpp @@ -32,6 +66,7 @@ add_library(OrthancMySQLStorage SHARED ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp + ${STORAGE_RESOURCES} Plugins/MySQLStorageArea.cpp Plugins/StoragePlugin.cpp