Don't add executables to cmake exports
authorGert Wollny <gw.fossdev@gmail.com>
Tue, 10 Nov 2020 14:08:59 +0000 (15:08 +0100)
committerGert Wollny <gewo@debian.org>
Tue, 10 Nov 2020 14:08:59 +0000 (15:08 +0100)
Bug-Debian: https://bugs.debian.org/803304

CMake exports are used by other packages that compile
and link against dcmtk. Because Debian moves some of
these executables and also dosn't install the test
executables, this import may fail leading to failure
to configure the according package.

Gbp-Pq: Name 07_dont_export_all_executables.patch

CMake/dcmtkMacros.cmake

index cdf17d78947b67ce7c00483dcbd45f3b51a0c8f6..f2f000417d0c67f8d971de9f1cc29fd15e49b279 100644 (file)
@@ -60,11 +60,11 @@ macro(DCMTK_ADD_EXECUTABLE PROGRAM)
         endif()
 
         # Collect executable as part of global DCMTK_EXECUTABLE_TARGETS property
-        set_property(GLOBAL APPEND PROPERTY DCMTK_EXECUTABLE_TARGETS ${PROGRAM})
+        #set_property(GLOBAL APPEND PROPERTY DCMTK_EXECUTABLE_TARGETS ${PROGRAM})
 
         # declare installation files, also export DCMTKTargets.cmake
         install(TARGETS ${PROGRAM}
-                EXPORT DCMTKTargets
+        #        EXPORT DCMTKTargets
                 COMPONENT bin
                 DESTINATION ${CMAKE_INSTALL_BINDIR})
     endif()