changeset 441:2b797871eff6

handling of DefineSourceBasenameForTarget for MySQL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Dec 2023 21:30:46 +0100
parents 2f654d1038a1
children 11cbf4343b5f
files MySQL/CMakeLists.txt Odbc/CMakeLists.txt PostgreSQL/CMakeLists.txt SQLite/CMakeLists.txt
diffstat 4 files changed, 23 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MySQL/CMakeLists.txt	Wed Dec 20 11:39:46 2023 +0100
+++ b/MySQL/CMakeLists.txt	Wed Dec 20 21:30:46 2023 +0100
@@ -177,3 +177,10 @@
 set_target_properties(UnitTests PROPERTIES
   COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0
   )
+
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(FrameworkForPlugins)
+  DefineSourceBasenameForTarget(OrthancMySQLIndex)
+  DefineSourceBasenameForTarget(OrthancMySQLStorage)
+  DefineSourceBasenameForTarget(UnitTests)
+endif()
--- a/Odbc/CMakeLists.txt	Wed Dec 20 11:39:46 2023 +0100
+++ b/Odbc/CMakeLists.txt	Wed Dec 20 21:30:46 2023 +0100
@@ -150,9 +150,6 @@
   COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
   )
 
-DefineSourceBasenameForTarget(OrthancOdbcIndex)
-DefineSourceBasenameForTarget(OrthancOdbcStorage)
-
 install(
   TARGETS OrthancOdbcIndex OrthancOdbcStorage
   RUNTIME DESTINATION lib    # Destination for Windows
@@ -178,4 +175,9 @@
   COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0
   )
 
-DefineSourceBasenameForTarget(UnitTests)
\ No newline at end of file
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(FrameworkForPlugins)
+  DefineSourceBasenameForTarget(OrthancOdbcIndex)
+  DefineSourceBasenameForTarget(OrthancOdbcStorage)
+  DefineSourceBasenameForTarget(UnitTests)
+endif()
--- a/PostgreSQL/CMakeLists.txt	Wed Dec 20 11:39:46 2023 +0100
+++ b/PostgreSQL/CMakeLists.txt	Wed Dec 20 21:30:46 2023 +0100
@@ -155,9 +155,6 @@
   COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
   )
 
-DefineSourceBasenameForTarget(OrthancPostgreSQLIndex)
-DefineSourceBasenameForTarget(OrthancPostgreSQLStorage)
- 
 
 install(
   TARGETS OrthancPostgreSQLIndex OrthancPostgreSQLStorage
@@ -183,4 +180,9 @@
   COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0
   )
 
-DefineSourceBasenameForTarget(UnitTests)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(FrameworkForPlugins)
+  DefineSourceBasenameForTarget(OrthancPostgreSQLIndex)
+  DefineSourceBasenameForTarget(OrthancPostgreSQLStorage)
+  DefineSourceBasenameForTarget(UnitTests)
+endif()
--- a/SQLite/CMakeLists.txt	Wed Dec 20 11:39:46 2023 +0100
+++ b/SQLite/CMakeLists.txt	Wed Dec 20 21:30:46 2023 +0100
@@ -97,8 +97,6 @@
   COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=1
   )
 
-DefineSourceBasenameForTarget(OrthancSQLiteIndex)
-
 install(
   TARGETS OrthancSQLiteIndex  # OrthancSQLiteStorage  TODO
   RUNTIME DESTINATION lib    # Destination for Windows
@@ -120,4 +118,7 @@
   COMPILE_FLAGS -DORTHANC_ENABLE_LOGGING_PLUGIN=0
   )
 
-DefineSourceBasenameForTarget(UnitTests)
\ No newline at end of file
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(OrthancSQLiteIndex)
+  DefineSourceBasenameForTarget(UnitTests)
+endif()