File: dcmtkAfterModules.cmake

package info (click to toggle)
dcmtk 3.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 54,900 kB
  • sloc: cpp: 274,805; ansic: 47,345; makefile: 5,313; sh: 4,250; perl: 277; xml: 182; lex: 103
file content (27 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Finish the setup. This should be run after all modules.

if(BUILD_SINGLE_SHARED_LIBRARY)
  # Collect the object files of all libraries in all modules.
  # The variable ${DCMTK_ALL_LIBRARIES} is set by DCMTK_ADD_LIBRARY().
  set(LIBS)
  foreach(LIB ${DCMTK_ALL_LIBRARIES})
    set(LIBS ${LIBS} $<TARGET_OBJECTS:${LIB}>)
  endforeach()

  # Build a single "everything-library".
  # The library dependencies are collected by DCMTK_TARGET_LINK_LIBRARIES().
  add_library(dcmtk SHARED ${LIBS})
  target_link_libraries(dcmtk ${DCMTK_LIBRARY_DEPENDENCIES})
  set_target_properties(dcmtk PROPERTIES ${DCMTK_LIBRARY_PROPERTIES})

  # Export target for build tree
  set_property(GLOBAL APPEND PROPERTY DCMTK_LIBRARY_TARGETS dcmtk)

  # Declare installation files. Also export libs and executables to DCMTKTargets.cmake.
  install(TARGETS dcmtk
          EXPORT DCMTKTargets
          COMPONENT lib
          RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
          LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
endif()