comparison PostgreSQL/CMakeLists.txt @ 37:23761c478d86

integration 2.2->mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 16 Jul 2018 20:17:43 +0200
parents 199af032e6e7 21e80ef7483c
children e78d7077ee1c
comparison
equal deleted inserted replaced
35:199af032e6e7 37:23761c478d86
15 15
16 set(ENABLE_POSTGRESQL_BACKEND ON) 16 set(ENABLE_POSTGRESQL_BACKEND ON)
17 17
18 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake) 18 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake)
19 19
20
21 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
22 execute_process(
23 COMMAND
24 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
25 ${ORTHANC_PLUGIN_VERSION} "PostgreSQL storage area plugin" OrthancPostgreSQLStorage.dll
26 "PostgreSQL as a database back-end to Orthanc (storage area)"
27 ERROR_VARIABLE Failure
28 OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc
29 )
30
31 if (Failure)
32 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
33 endif()
34
35 execute_process(
36 COMMAND
37 ${PYTHON_EXECUTABLE} ${ORTHANC_ROOT}/Resources/WindowsResources.py
38 ${ORTHANC_PLUGIN_VERSION} "PostgreSQL index plugin" OrthancPostgreSQLIndex.dll
39 "PostgreSQL as a database back-end to Orthanc (index)"
40 ERROR_VARIABLE Failure
41 OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc
42 )
43
44 if (Failure)
45 message(FATAL_ERROR "Error while computing the version information: ${Failure}")
46 endif()
47
48 set(INDEX_RESOURCES ${AUTOGENERATED_DIR}/IndexVersion.rc)
49 set(STORAGE_RESOURCES ${AUTOGENERATED_DIR}/StorageVersion.rc)
50 endif()
51
52
20 EmbedResources( 53 EmbedResources(
21 POSTGRESQL_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql 54 POSTGRESQL_PREPARE_INDEX ${CMAKE_SOURCE_DIR}/Plugins/PrepareIndex.sql
22 ) 55 )
23 56
24 add_library(OrthancPostgreSQLIndex SHARED 57 add_library(OrthancPostgreSQLIndex SHARED
58 ${INDEX_RESOURCES}
25 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp 59 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp
26 Plugins/IndexPlugin.cpp 60 Plugins/IndexPlugin.cpp
27 Plugins/PostgreSQLIndex.cpp 61 Plugins/PostgreSQLIndex.cpp
28 62
29 ${DATABASES_SOURCES} 63 ${DATABASES_SOURCES}
30 ${AUTOGENERATED_SOURCES} 64 ${AUTOGENERATED_SOURCES}
31 ) 65 )
32 66
33 add_library(OrthancPostgreSQLStorage SHARED 67 add_library(OrthancPostgreSQLStorage SHARED
34 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp 68 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp
69 ${STORAGE_RESOURCES}
35 Plugins/PostgreSQLStorageArea.cpp 70 Plugins/PostgreSQLStorageArea.cpp
36 Plugins/StoragePlugin.cpp 71 Plugins/StoragePlugin.cpp
37 72
38 ${DATABASES_SOURCES} 73 ${DATABASES_SOURCES}
39 ${AUTOGENERATED_SOURCES} 74 ${AUTOGENERATED_SOURCES}