Mercurial > hg > orthanc-databases
comparison MySQL/CMakeLists.txt @ 315:11641063ddb2
speed up compilation by sharing library between plugins
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 14 Jul 2021 18:29:27 +0200 |
parents | 2447c290fc73 |
children | 1c2cd90418c9 |
comparison
equal
deleted
inserted
replaced
314:64763998cdff | 315:11641063ddb2 |
---|---|
65 AutogeneratedTarget | 65 AutogeneratedTarget |
66 DEPENDS | 66 DEPENDS |
67 ${AUTOGENERATED_SOURCES} | 67 ${AUTOGENERATED_SOURCES} |
68 ) | 68 ) |
69 | 69 |
70 add_library(FrameworkForPlugins STATIC | |
71 ${AUTOGENERATED_SOURCES} | |
72 ${DATABASES_SOURCES} | |
73 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp | |
74 Plugins/MySQLIndex.cpp | |
75 Plugins/MySQLStorageArea.cpp | |
76 ) | |
77 | |
78 set_property(TARGET FrameworkForPlugins | |
79 PROPERTY POSITION_INDEPENDENT_CODE ON | |
80 ) | |
81 | |
70 add_library(OrthancMySQLIndex SHARED | 82 add_library(OrthancMySQLIndex SHARED |
71 ${INDEX_RESOURCES} | 83 ${INDEX_RESOURCES} |
72 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp | |
73 Plugins/IndexPlugin.cpp | 84 Plugins/IndexPlugin.cpp |
74 Plugins/MySQLIndex.cpp | |
75 | |
76 ${DATABASES_SOURCES} | |
77 ${AUTOGENERATED_SOURCES} | |
78 ) | 85 ) |
79 | 86 |
80 add_dependencies(OrthancMySQLIndex AutogeneratedTarget) | |
81 | |
82 add_library(OrthancMySQLStorage SHARED | 87 add_library(OrthancMySQLStorage SHARED |
83 ${ORTHANC_DATABASES_ROOT}/Framework/Plugins/PluginInitialization.cpp | |
84 ${STORAGE_RESOURCES} | 88 ${STORAGE_RESOURCES} |
85 Plugins/MySQLStorageArea.cpp | |
86 Plugins/StoragePlugin.cpp | 89 Plugins/StoragePlugin.cpp |
87 | |
88 ${DATABASES_SOURCES} | |
89 ${AUTOGENERATED_SOURCES} | |
90 ) | 90 ) |
91 | 91 |
92 target_link_libraries(OrthancMySQLIndex FrameworkForPlugins) | |
93 target_link_libraries(OrthancMySQLStorage FrameworkForPlugins) | |
94 | |
95 add_dependencies(OrthancMySQLIndex AutogeneratedTarget) | |
92 add_dependencies(OrthancMySQLStorage AutogeneratedTarget) | 96 add_dependencies(OrthancMySQLStorage AutogeneratedTarget) |
93 | 97 |
94 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") | 98 message("Setting the version of the libraries to ${ORTHANC_PLUGIN_VERSION}") |
95 | 99 |
96 add_definitions( | 100 add_definitions( |