comparison Odbc/CMakeLists.txt @ 330:8f17f23c9af7

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 10 Aug 2021 20:52:16 +0200
parents b5fb8b77ce4d
children 57923e1c323d
comparison
equal deleted inserted replaced
329:b5fb8b77ce4d 330:8f17f23c9af7
16 # You should have received a copy of the GNU Affero General Public License 16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 18
19 19
20 cmake_minimum_required(VERSION 2.8) 20 cmake_minimum_required(VERSION 2.8)
21 project(OrthancODBC) 21 project(OrthancOdbc)
22 22
23 set(ORTHANC_PLUGIN_VERSION "mainline") 23 set(ORTHANC_PLUGIN_VERSION "mainline")
24 24
25 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1) 25 set(ORTHANC_OPTIMAL_VERSION_MAJOR 1)
26 set(ORTHANC_OPTIMAL_VERSION_MINOR 9) 26 set(ORTHANC_OPTIMAL_VERSION_MINOR 9)
43 43
44 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") 44 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
45 execute_process( 45 execute_process(
46 COMMAND 46 COMMAND
47 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py 47 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py
48 ${ORTHANC_PLUGIN_VERSION} "ODBC storage area plugin" OrthancODBCStorage.dll 48 ${ORTHANC_PLUGIN_VERSION} "ODBC storage area plugin" OrthancOdbcStorage.dll
49 "ODBC as a database back-end to Orthanc (storage area)" 49 "ODBC as a database back-end to Orthanc (storage area)"
50 ERROR_VARIABLE Failure 50 ERROR_VARIABLE Failure
51 OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc 51 OUTPUT_FILE ${AUTOGENERATED_DIR}/StorageVersion.rc
52 ) 52 )
53 53
56 endif() 56 endif()
57 57
58 execute_process( 58 execute_process(
59 COMMAND 59 COMMAND
60 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py 60 ${PYTHON_EXECUTABLE} ${ORTHANC_FRAMEWORK_ROOT}/../Resources/WindowsResources.py
61 ${ORTHANC_PLUGIN_VERSION} "ODBC index plugin" OrthancODBCIndex.dll 61 ${ORTHANC_PLUGIN_VERSION} "ODBC index plugin" OrthancOdbcIndex.dll
62 "ODBC as a database back-end to Orthanc (index)" 62 "ODBC as a database back-end to Orthanc (index)"
63 ERROR_VARIABLE Failure 63 ERROR_VARIABLE Failure
64 OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc 64 OUTPUT_FILE ${AUTOGENERATED_DIR}/IndexVersion.rc
65 ) 65 )
66 66
97 set_target_properties(FrameworkForPlugins PROPERTIES 97 set_target_properties(FrameworkForPlugins PROPERTIES
98 POSITION_INDEPENDENT_CODE ON 98 POSITION_INDEPENDENT_CODE ON
99 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 99 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
100 ) 100 )
101 101
102 add_library(OrthancODBCIndex SHARED 102 add_library(OrthancOdbcIndex SHARED
103 ${INDEX_RESOURCES} 103 ${INDEX_RESOURCES}
104 Plugins/IndexPlugin.cpp 104 Plugins/IndexPlugin.cpp
105 ) 105 )
106 106
107 add_library(OrthancODBCStorage SHARED 107 add_library(OrthancOdbcStorage SHARED
108 ${STORAGE_RESOURCES} 108 ${STORAGE_RESOURCES}
109 Plugins/StoragePlugin.cpp 109 Plugins/StoragePlugin.cpp
110 ) 110 )
111 111
112 add_dependencies(FrameworkForPlugins AutogeneratedTarget) 112 add_dependencies(FrameworkForPlugins AutogeneratedTarget)
113 113
114 target_link_libraries(OrthancODBCIndex FrameworkForPlugins) 114 target_link_libraries(OrthancOdbcIndex FrameworkForPlugins)
115 target_link_libraries(OrthancODBCStorage FrameworkForPlugins) 115 target_link_libraries(OrthancOdbcStorage FrameworkForPlugins)
116 116
117 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") 117 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}")
118 118
119 add_definitions( 119 add_definitions(
120 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}" 120 -DORTHANC_PLUGIN_VERSION="${ORTHANC_PLUGIN_VERSION}"
121 ) 121 )
122 122
123 set_target_properties(OrthancODBCStorage PROPERTIES 123 set_target_properties(OrthancOdbcStorage PROPERTIES
124 VERSION ${ORTHANC_PLUGIN_VERSION} 124 VERSION ${ORTHANC_PLUGIN_VERSION}
125 SOVERSION ${ORTHANC_PLUGIN_VERSION} 125 SOVERSION ${ORTHANC_PLUGIN_VERSION}
126 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 126 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
127 ) 127 )
128 128
129 set_target_properties(OrthancODBCIndex PROPERTIES 129 set_target_properties(OrthancOdbcIndex PROPERTIES
130 VERSION ${ORTHANC_PLUGIN_VERSION} 130 VERSION ${ORTHANC_PLUGIN_VERSION}
131 SOVERSION ${ORTHANC_PLUGIN_VERSION} 131 SOVERSION ${ORTHANC_PLUGIN_VERSION}
132 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1 132 COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
133 ) 133 )
134 134
135 install( 135 install(
136 TARGETS OrthancODBCIndex OrthancODBCStorage 136 TARGETS OrthancOdbcIndex OrthancOdbcStorage
137 RUNTIME DESTINATION lib # Destination for Windows 137 RUNTIME DESTINATION lib # Destination for Windows
138 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux 138 LIBRARY DESTINATION share/orthanc/plugins # Destination for Linux
139 ) 139 )
140 140
141 141