# HG changeset patch # User Sebastien Jodogne # Date 1531764915 -7200 # Node ID 21e80ef7483cd4ade8e4f6d467d55a1e3e5f1755 # Parent 860542a0a64bb8f8150c5768997b53a54c84cb31 dll versioning diff -r 860542a0a64b -r 21e80ef7483c PostgreSQL/CMakeLists.txt --- a/PostgreSQL/CMakeLists.txt Mon Jul 16 17:16:27 2018 +0200 +++ b/PostgreSQL/CMakeLists.txt Mon Jul 16 20:15:15 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} "PostgreSQL storage area plugin" OrthancPostgreSQLStorage.dll + "PostgreSQL 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} "PostgreSQL index plugin" OrthancPostgreSQLIndex.dll + "PostgreSQL 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( POSTGRESQL_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql ) add_library(OrthancPostgreSQLIndex SHARED + ${INDEX_RESOURCES} ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp Plugins/IndexPlugin.cpp Plugins/PostgreSQLIndex.cpp @@ -32,6 +66,7 @@ add_library(OrthancPostgreSQLStorage SHARED ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp + ${STORAGE_RESOURCES} Plugins/PostgreSQLStorageArea.cpp Plugins/StoragePlugin.cpp