comparison Applications/Samples/Sdl/CMakeLists.txt @ 2110:352cb0fa57b2

fixed handling of DefineSourceBasenameForTarget
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Dec 2023 22:20:58 +0100
parents 07964689cb0b
children f8f80e432abc
comparison
equal deleted inserted replaced
2109:9aa99c45cfaa 2110:352cb0fa57b2
75 ${ORTHANC_STONE_SOURCES} 75 ${ORTHANC_STONE_SOURCES}
76 ${AUTOGENERATED_SOURCES} 76 ${AUTOGENERATED_SOURCES}
77 ${BOOST_EXTENDED_SOURCES} 77 ${BOOST_EXTENDED_SOURCES}
78 ) 78 )
79 79
80 DefineSourceBasenameForTarget(OrthancStone) 80 if (COMMAND DefineSourceBasenameForTarget)
81 DefineSourceBasenameForTarget(OrthancStone)
82 endif()
81 83
82 message(${AUTOGENERATED_SOURCES}) 84 message(${AUTOGENERATED_SOURCES})
83 85
84 86
85 87
94 ../Common/RtViewerView.cpp 96 ../Common/RtViewerView.cpp
95 ../Common/RtViewerView.h 97 ../Common/RtViewerView.h
96 ../Common/SampleHelpers.h 98 ../Common/SampleHelpers.h
97 ) 99 )
98 100
99 DefineSourceBasenameForTarget(RtViewerSdl) 101 if (COMMAND DefineSourceBasenameForTarget)
102 DefineSourceBasenameForTarget(RtViewerSdl)
103 endif()
100 104
101 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES}) 105 target_link_libraries(RtViewerSdl OrthancStone ${DCMTK_LIBRARIES})
102 106
103 ############################# 107 #############################
104 project(SdlSimpleViewer) 108 project(SdlSimpleViewer)
108 ../Common/SampleHelpers.h 112 ../Common/SampleHelpers.h
109 SingleFrameViewer/SdlSimpleViewerApplication.h 113 SingleFrameViewer/SdlSimpleViewerApplication.h
110 SingleFrameViewer/SdlSimpleViewer.cpp 114 SingleFrameViewer/SdlSimpleViewer.cpp
111 ) 115 )
112 116
113 DefineSourceBasenameForTarget(SdlSimpleViewer) 117 if (COMMAND DefineSourceBasenameForTarget)
118 DefineSourceBasenameForTarget(SdlSimpleViewer)
119 endif()
114 120
115 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES}) 121 target_link_libraries(SdlSimpleViewer OrthancStone ${DCMTK_LIBRARIES})
116 122
117 ############################# 123 #############################
118 project(UnitTests) 124 project(UnitTests)
120 add_executable(UnitTests 126 add_executable(UnitTests
121 ${GOOGLE_TEST_SOURCES} 127 ${GOOGLE_TEST_SOURCES}
122 ${UNIT_TESTS_SOURCES} 128 ${UNIT_TESTS_SOURCES}
123 ) 129 )
124 130
125 DefineSourceBasenameForTarget(UnitTests) 131 if (COMMAND DefineSourceBasenameForTarget)
132 DefineSourceBasenameForTarget(UnitTests)
133 endif()
126 134
127 target_link_libraries(UnitTests OrthancStone) 135 target_link_libraries(UnitTests OrthancStone)
128 136
129 add_custom_command( 137 add_custom_command(
130 TARGET UnitTests 138 TARGET UnitTests