changeset 2110:352cb0fa57b2

fixed handling of DefineSourceBasenameForTarget
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Dec 2023 22:20:58 +0100
parents 9aa99c45cfaa
children f8f80e432abc
files Applications/Samples/RtViewerPlugin/CMakeLists.txt Applications/Samples/Sdl/CMakeLists.txt Applications/Samples/WebAssembly/CMakeLists.txt Applications/StoneWebViewer/Plugin/CMakeLists.txt Applications/StoneWebViewer/WebAssembly/CMakeLists.txt OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt OrthancStone/UnitTestsSources/CMakeLists.txt
diffstat 7 files changed, 36 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Samples/RtViewerPlugin/CMakeLists.txt	Wed Dec 20 21:46:19 2023 +0100
+++ b/Applications/Samples/RtViewerPlugin/CMakeLists.txt	Wed Dec 20 22:20:58 2023 +0100
@@ -119,7 +119,9 @@
   ${ORTHANC_CORE_SOURCES}
   )
 
-DefineSourceBasenameForTarget(RtViewerPlugin)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(RtViewerPlugin)
+endif()
 
 set_target_properties(RtViewerPlugin PROPERTIES 
   VERSION ${ORTHANC_PLUGIN_VERSION} 
--- a/Applications/Samples/Sdl/CMakeLists.txt	Wed Dec 20 21:46:19 2023 +0100
+++ b/Applications/Samples/Sdl/CMakeLists.txt	Wed Dec 20 22:20:58 2023 +0100
@@ -77,7 +77,9 @@
   ${BOOST_EXTENDED_SOURCES}
   )
 
-DefineSourceBasenameForTarget(OrthancStone)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(OrthancStone)
+endif()
 
 message(${AUTOGENERATED_SOURCES})
 
@@ -96,7 +98,9 @@
   ../Common/SampleHelpers.h
   )
 
-DefineSourceBasenameForTarget(RtViewerSdl)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(RtViewerSdl)
+endif()
 
 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES})
 
@@ -110,7 +114,9 @@
   SingleFrameViewer/SdlSimpleViewer.cpp
   )
 
-DefineSourceBasenameForTarget(SdlSimpleViewer)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(SdlSimpleViewer)
+endif()
 
 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES})
 
@@ -122,7 +128,9 @@
   ${UNIT_TESTS_SOURCES}
   )
 
-DefineSourceBasenameForTarget(UnitTests)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(UnitTests)
+endif()
 
 target_link_libraries(UnitTests OrthancStone)
 
--- a/Applications/Samples/WebAssembly/CMakeLists.txt	Wed Dec 20 21:46:19 2023 +0100
+++ b/Applications/Samples/WebAssembly/CMakeLists.txt	Wed Dec 20 22:20:58 2023 +0100
@@ -89,7 +89,9 @@
   ${AUTOGENERATED_SOURCES}
   )
 
-DefineSourceBasenameForTarget(OrthancStone)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(OrthancStone)
+endif()
 
 
 ################################################################################
@@ -107,7 +109,9 @@
   ../Common/RtViewerView.h
   )
 
-DefineSourceBasenameForTarget(RtViewerWasm)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(RtViewerWasm)
+endif()
 
 set_target_properties(RtViewerWasm
   PROPERTIES
@@ -149,7 +153,9 @@
   SingleFrameViewer/SingleFrameViewer.cpp
   )
 
-DefineSourceBasenameForTarget(SingleFrameViewerWasm)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(SingleFrameViewerWasm)
+endif()
 
 set_target_properties(SingleFrameViewerWasm
   PROPERTIES
--- a/Applications/StoneWebViewer/Plugin/CMakeLists.txt	Wed Dec 20 21:46:19 2023 +0100
+++ b/Applications/StoneWebViewer/Plugin/CMakeLists.txt	Wed Dec 20 22:20:58 2023 +0100
@@ -132,7 +132,9 @@
   ${ORTHANC_CORE_SOURCES}
   )
 
-DefineSourceBasenameForTarget(StoneWebViewer)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(StoneWebViewer)
+endif()
 
 set_target_properties(StoneWebViewer PROPERTIES 
   VERSION ${STONE_WEB_VIEWER_VERSION} 
--- a/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt	Wed Dec 20 21:46:19 2023 +0100
+++ b/Applications/StoneWebViewer/WebAssembly/CMakeLists.txt	Wed Dec 20 22:20:58 2023 +0100
@@ -138,7 +138,9 @@
 # Boost::Math begs for -std=c++14 since Boost 1.82.0
 set_property(TARGET StoneWebViewer PROPERTY CXX_STANDARD 14)
 
-DefineSourceBasenameForTarget(StoneWebViewer)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(StoneWebViewer)
+endif()
 
 set_target_properties(StoneWebViewer
   PROPERTIES
--- a/OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt	Wed Dec 20 21:46:19 2023 +0100
+++ b/OrthancStone/Resources/WebAssemblyUnitTests/CMakeLists.txt	Wed Dec 20 22:20:58 2023 +0100
@@ -122,7 +122,9 @@
 # Boost::Math begs for -std=c++14 since Boost 1.82.0
 set_property(TARGET UnitTests PROPERTY CXX_STANDARD 14)
 
-DefineSourceBasenameForTarget(UnitTests)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(UnitTests)
+endif()
 
   
 # Declare installation files for the module
--- a/OrthancStone/UnitTestsSources/CMakeLists.txt	Wed Dec 20 21:46:19 2023 +0100
+++ b/OrthancStone/UnitTestsSources/CMakeLists.txt	Wed Dec 20 22:20:58 2023 +0100
@@ -59,7 +59,9 @@
   ${ORTHANC_STONE_SOURCES}
   )
 
-DefineSourceBasenameForTarget(UnitTests)
+if (COMMAND DefineSourceBasenameForTarget)
+  DefineSourceBasenameForTarget(UnitTests)
+endif()
 
 add_custom_command(
   TARGET UnitTests