From 289b014f9615ba3e60cb96cfb0f9fa35ffb1ae02 Mon Sep 17 00:00:00 2001 From: Marco Eichelberg Date: Fri, 5 Jan 2024 08:37:31 +0100 Subject: [PATCH] Use relative CMake installation paths. Use relative CMake installation path variables such as CMAKE_INSTALL_DATADIR instead of absolute ones such as CMAKE_INSTALL_FULL_DATADIR, because CMake's CPack tool ignores install statements with absolute paths. --- CMake/GenerateDCMTKConfigure.cmake | 10 +++++----- CMakeLists.txt | 6 +++--- config/docs/CMakeLists.txt | 2 +- dcmdata/data/CMakeLists.txt | 2 +- dcmdata/docs/CMakeLists.txt | 2 +- dcmimgle/data/CMakeLists.txt | 2 +- dcmnet/docs/CMakeLists.txt | 2 +- dcmnet/etc/CMakeLists.txt | 2 +- dcmpstat/data/CMakeLists.txt | 2 +- dcmpstat/etc/CMakeLists.txt | 2 +- dcmqrdb/docs/CMakeLists.txt | 2 +- dcmqrdb/etc/CMakeLists.txt | 2 +- dcmsr/data/CMakeLists.txt | 2 +- dcmtls/docs/CMakeLists.txt | 2 +- dcmwlm/data/CMakeLists.txt | 2 +- dcmwlm/docs/CMakeLists.txt | 2 +- doxygen/CMakeLists.txt | 4 ++-- oficonv/data/CMakeLists.txt | 28 ++++++++++++++-------------- oflog/etc/CMakeLists.txt | 2 +- 19 files changed, 39 insertions(+), 39 deletions(-) diff --git CMake/GenerateDCMTKConfigure.cmake CMake/GenerateDCMTKConfigure.cmake index 8a59d44fa..f388f8e8d 100644 --- CMake/GenerateDCMTKConfigure.cmake +++ CMake/GenerateDCMTKConfigure.cmake @@ -165,8 +165,8 @@ if(WIN32 AND NOT CYGWIN) set(DCMTK_DEFAULT_CONFIGURATION_DIR "%PROGRAMDATA%\\\\dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}\\\\etc${PATH_SEPARATOR}") set(DCMTK_DEFAULT_SUPPORT_DATA_DIR "%PROGRAMDATA%\\\\dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}\\\\share${PATH_SEPARATOR}") else() - set(CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}") - set(CMAKE_INSTALL_FULL_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}-${DCMTK_COMPLETE_PACKAGE_VERSION}") + set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}") + set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}-${DCMTK_COMPLETE_PACKAGE_VERSION}") set(DCMTK_DEFAULT_CONFIGURATION_DIR "") set(DCMTK_DEFAULT_SUPPORT_DATA_DIR "") endif() @@ -202,9 +202,9 @@ else() # Modify the installation paths for configuration files, data files and documents # by adding a subdirectory with the DCMTK name and version number - set(CMAKE_INSTALL_FULL_SYSCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}") - set(CMAKE_INSTALL_FULL_DATADIR "${CMAKE_INSTALL_FULL_DATADIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}") - set(CMAKE_INSTALL_FULL_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}-${DCMTK_COMPLETE_PACKAGE_VERSION}") + set(CMAKE_INSTALL_SYSCONFDIR "${CMAKE_INSTALL_SYSCONFDIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}") + set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATADIR}/dcmtk-${DCMTK_COMPLETE_PACKAGE_VERSION}") + set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DOCDIR}-${DCMTK_COMPLETE_PACKAGE_VERSION}") # These variables are defined as macros in osconfig.h and must end with a path separator set(DCMTK_DEFAULT_CONFIGURATION_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/") diff --git CMakeLists.txt CMakeLists.txt index bef673fce..775d2e0ea 100644 --- CMakeLists.txt +++ CMakeLists.txt @@ -1,5 +1,5 @@ # Minimum CMake version required -cmake_minimum_required(VERSION 3.0.0...3.27.3 FATAL_ERROR) +cmake_minimum_required(VERSION 3.0.0...3.27.9 FATAL_ERROR) # Declare project project(DCMTK) @@ -95,9 +95,9 @@ install(FILES "${DCMTK_BINARY_DIR}/config/include/dcmtk/config/osconfig.h" # Install DCMTK's general documentation files install(FILES ANNOUNCE COPYRIGHT CREDITS FAQ HISTORY VERSION - DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" + DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) -install(DIRECTORY docs/ DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" +install(DIRECTORY docs/ DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc FILES_MATCHING PATTERN "CHANGES.???") #----------------------------------------------------------------------------- diff --git config/docs/CMakeLists.txt config/docs/CMakeLists.txt index 3bbba8f64..c1b2ecd65 100644 --- config/docs/CMakeLists.txt +++ config/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" COMPONENT doc) +install(FILES config.txt dirstruc.txt envvars.txt macros.txt modules.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git dcmdata/data/CMakeLists.txt dcmdata/data/CMakeLists.txt index 29517f8c1..d38cd3953 100644 --- dcmdata/data/CMakeLists.txt +++ dcmdata/data/CMakeLists.txt @@ -1,5 +1,5 @@ # declare installation files -install(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}" COMPONENT data) +install(FILES dicom.dic acrnema.dic private.dic diconde.dic dcm2xml.dtd dumppat.txt SC.dump VLP.dump DESTINATION "${CMAKE_INSTALL_DATADIR}" COMPONENT data) # add paths to the dictionaries to a CMake variable for being used by the unit tests set(DCMTK_DICOM_DICTIONARIES diff --git dcmdata/docs/CMakeLists.txt dcmdata/docs/CMakeLists.txt index 6e12ee64d..26d0ac5fc 100644 --- dcmdata/docs/CMakeLists.txt +++ dcmdata/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES datadict.txt DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" COMPONENT doc) +install(FILES datadict.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git dcmimgle/data/CMakeLists.txt dcmimgle/data/CMakeLists.txt index b5282fa08..4b62f0357 100644 --- dcmimgle/data/CMakeLists.txt +++ dcmimgle/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}" COMPONENT data) +install(FILES camera.lut monitor.lut printer.lut scanner.lut DESTINATION "${CMAKE_INSTALL_DATADIR}" COMPONENT data) diff --git dcmnet/docs/CMakeLists.txt dcmnet/docs/CMakeLists.txt index 9fc0932ae..176ffbb05 100644 --- dcmnet/docs/CMakeLists.txt +++ dcmnet/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES asconfig.txt testing.txt DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" COMPONENT doc) +install(FILES asconfig.txt testing.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git dcmnet/etc/CMakeLists.txt dcmnet/etc/CMakeLists.txt index 342add456..ec35aa975 100644 --- dcmnet/etc/CMakeLists.txt +++ dcmnet/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES storescp.cfg storescu.cfg DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}" COMPONENT etc) +install(FILES storescp.cfg storescu.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}" COMPONENT etc) diff --git dcmpstat/data/CMakeLists.txt dcmpstat/data/CMakeLists.txt index b00b7cf5a..835252198 100644 --- dcmpstat/data/CMakeLists.txt +++ dcmpstat/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES philips.lut DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}" COMPONENT data) +install(FILES philips.lut DESTINATION "${CMAKE_INSTALL_DATADIR}" COMPONENT data) diff --git dcmpstat/etc/CMakeLists.txt dcmpstat/etc/CMakeLists.txt index 24d822f78..d9902c28b 100644 --- dcmpstat/etc/CMakeLists.txt +++ dcmpstat/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES dcmpstat.cfg printers.cfg DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}" COMPONENT etc) +install(FILES dcmpstat.cfg printers.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}" COMPONENT etc) diff --git dcmqrdb/docs/CMakeLists.txt dcmqrdb/docs/CMakeLists.txt index cbd469f6e..ec15335fd 100644 --- dcmqrdb/docs/CMakeLists.txt +++ dcmqrdb/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES dcmqrcnf.txt dcmqrset.txt DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" COMPONENT doc) +install(FILES dcmqrcnf.txt dcmqrset.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git dcmqrdb/etc/CMakeLists.txt dcmqrdb/etc/CMakeLists.txt index cd6d506aa..09f57138d 100644 --- dcmqrdb/etc/CMakeLists.txt +++ dcmqrdb/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES dcmqrscp.cfg DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}" COMPONENT etc) +install(FILES dcmqrscp.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}" COMPONENT etc) diff --git dcmsr/data/CMakeLists.txt dcmsr/data/CMakeLists.txt index 3d68d772c..34f0232e1 100644 --- dcmsr/data/CMakeLists.txt +++ dcmsr/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES dsr2xml.xsd report.css reportx.css DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}" COMPONENT data) +install(FILES dsr2xml.xsd report.css reportx.css DESTINATION "${CMAKE_INSTALL_DATADIR}" COMPONENT data) diff --git dcmtls/docs/CMakeLists.txt dcmtls/docs/CMakeLists.txt index 77085e29b..a9da39d83 100644 --- dcmtls/docs/CMakeLists.txt +++ dcmtls/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES ciphers.txt randseed.txt DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" COMPONENT doc) +install(FILES ciphers.txt randseed.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git dcmwlm/data/CMakeLists.txt dcmwlm/data/CMakeLists.txt index cc6fbf29f..1f9e63ce9 100644 --- dcmwlm/data/CMakeLists.txt +++ dcmwlm/data/CMakeLists.txt @@ -1,2 +1,2 @@ # declare directories to be installed -install(DIRECTORY wlistdb wlistqry DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}" COMPONENT data) +install(DIRECTORY wlistdb wlistqry DESTINATION "${CMAKE_INSTALL_DATADIR}" COMPONENT data) diff --git dcmwlm/docs/CMakeLists.txt dcmwlm/docs/CMakeLists.txt index be1196551..ef5f86378 100644 --- dcmwlm/docs/CMakeLists.txt +++ dcmwlm/docs/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES wlmsetup.txt DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" COMPONENT doc) +install(FILES wlmsetup.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc) diff --git doxygen/CMakeLists.txt doxygen/CMakeLists.txt index cde14b10a..0aa6292f3 100644 --- doxygen/CMakeLists.txt +++ doxygen/CMakeLists.txt @@ -39,9 +39,9 @@ if(DCMTK_WITH_DOXYGEN) endif() # install html docs and manpages - install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/htmldocs/" DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}/html" COMPONENT html PATTERN "*.md5" EXCLUDE) + install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/htmldocs/" DESTINATION "${CMAKE_INSTALL_DOCDIR}/html" COMPONENT html PATTERN "*.md5" EXCLUDE) if(DCMTK_GENERATE_DOXYGEN_TAGFILE) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${DOXYGEN_TAGFILE}" DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}" COMPONENT html OPTIONAL) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${DOXYGEN_TAGFILE}" DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT html OPTIONAL) endif() if(DCMTK_ENABLE_MANPAGES) file(GLOB_RECURSE MANPAGES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/manpages/" "${CMAKE_CURRENT_SOURCE_DIR}/manpages/*.1") diff --git oficonv/data/CMakeLists.txt oficonv/data/CMakeLists.txt index 8f82ce8a2..f2589e50d 100644 --- oficonv/data/CMakeLists.txt +++ oficonv/data/CMakeLists.txt @@ -15,13 +15,13 @@ install(FILES "csmapper/charset.pivot.pvdb" "csmapper/mapper.dir" "csmapper/mapper.dir.db" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/csmapper" + DESTINATION "${CMAKE_INSTALL_DATADIR}/csmapper" COMPONENT data) install(FILES "csmapper/CP/CP936EXT%UCS.mps" "csmapper/CP/UCS%CP936EXT.mps" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/csmapper/CP" + DESTINATION "${CMAKE_INSTALL_DATADIR}/csmapper/CP" COMPONENT data) install(FILES @@ -40,7 +40,7 @@ install(FILES "csmapper/GB/UCS%GBKEXT.mps" "csmapper/GB/UCS%GBKUDA.mps" "csmapper/GB/UCS@BMP%GB18030.mps" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/csmapper/GB" + DESTINATION "${CMAKE_INSTALL_DATADIR}/csmapper/GB" COMPONENT data) install(FILES @@ -64,13 +64,13 @@ install(FILES "csmapper/ISO-8859/UCS%ISO-8859-7.mps" "csmapper/ISO-8859/UCS%ISO-8859-8.mps" "csmapper/ISO-8859/UCS%ISO-8859-9.mps" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/csmapper/ISO-8859" + DESTINATION "${CMAKE_INSTALL_DATADIR}/csmapper/ISO-8859" COMPONENT data) install(FILES "csmapper/ISO646/ISO646-JP%UCS.646" "csmapper/ISO646/ISO646-US%UCS.646" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/csmapper/ISO646" + DESTINATION "${CMAKE_INSTALL_DATADIR}/csmapper/ISO646" COMPONENT data) install(FILES @@ -80,7 +80,7 @@ install(FILES "csmapper/JIS/UCS%JISX0201-KANA.mps" "csmapper/JIS/UCS%JISX0208@1990.mps" "csmapper/JIS/UCS%JISX0212.mps" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/csmapper/JIS" + DESTINATION "${CMAKE_INSTALL_DATADIR}/csmapper/JIS" COMPONENT data) install(FILES @@ -88,25 +88,25 @@ install(FILES "csmapper/KS/KSC5601HANJA%UCS.mps" "csmapper/KS/UCS%KSC5601HANGUL.mps" "csmapper/KS/UCS%KSC5601HANJA.mps" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/csmapper/KS" + DESTINATION "${CMAKE_INSTALL_DATADIR}/csmapper/KS" COMPONENT data) install(FILES "esdb/esdb.alias.db" "esdb/esdb.dir.db" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/esdb" + DESTINATION "${CMAKE_INSTALL_DATADIR}/esdb" COMPONENT data) install(FILES "esdb/EUC/EUC-CN.esdb" "esdb/EUC/EUC-KR.esdb" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/esdb/EUC" + DESTINATION "${CMAKE_INSTALL_DATADIR}/esdb/EUC" COMPONENT data) install(FILES "esdb/GB/GB18030.esdb" "esdb/GB/GBK.esdb" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/esdb/GB" + DESTINATION "${CMAKE_INSTALL_DATADIR}/esdb/GB" COMPONENT data) install(FILES @@ -121,12 +121,12 @@ install(FILES "esdb/ISO-8859/ISO-8859-7.esdb" "esdb/ISO-8859/ISO-8859-8.esdb" "esdb/ISO-8859/ISO-8859-9.esdb" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/esdb/ISO-8859" + DESTINATION "${CMAKE_INSTALL_DATADIR}/esdb/ISO-8859" COMPONENT data) install(FILES "esdb/ISO646/ISO646-US.esdb" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/esdb/ISO646" + DESTINATION "${CMAKE_INSTALL_DATADIR}/esdb/ISO646" COMPONENT data) install(FILES @@ -134,7 +134,7 @@ install(FILES "esdb/MISC/JISX0208@1990.esdb" "esdb/MISC/JISX0212.esdb" "esdb/MISC/Shift_JIS.esdb" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/esdb/MISC" + DESTINATION "${CMAKE_INSTALL_DATADIR}/esdb/MISC" COMPONENT data) install(FILES @@ -149,6 +149,6 @@ install(FILES "esdb/UTF/UTF-32BE.esdb" "esdb/UTF/UTF-32LE.esdb" "esdb/UTF/UTF-8.esdb" - DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/esdb/UTF" + DESTINATION "${CMAKE_INSTALL_DATADIR}/esdb/UTF" COMPONENT data) diff --git oflog/etc/CMakeLists.txt oflog/etc/CMakeLists.txt index 876b5c6b3..478452026 100644 --- oflog/etc/CMakeLists.txt +++ oflog/etc/CMakeLists.txt @@ -1,2 +1,2 @@ # declare installation files -install(FILES logger.cfg filelog.cfg DESTINATION "${CMAKE_INSTALL_FULL_SYSCONFDIR}" COMPONENT etc) +install(FILES logger.cfg filelog.cfg DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}" COMPONENT etc)