From d2cd0241b321b2c385fe048e676e4ca5da750a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=BDu=C5=BEek?= Date: Wed, 31 Jul 2024 16:24:07 +0100 Subject: [PATCH] [CMake] Don't use CMAKE_SOURCE_DIR during install Referring to an installed file using `CMAKE_SOURCE_DIR` only works when UMF is built and installed standalone, but not when it's included by other projects. Only `LICENSE.TXT` and `licensing/third-party-programs.txt` still had these issue, while other files already used `PROJECT_SOURCE_DIR`. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 077359689..afe2b563e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -599,10 +599,10 @@ endif() # --------------------------------------------------------------------------- # # Configure make install/uninstall and packages # --------------------------------------------------------------------------- # -install(FILES ${CMAKE_SOURCE_DIR}/LICENSE.TXT +install(FILES ${PROJECT_SOURCE_DIR}/LICENSE.TXT DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/") install( - FILES ${CMAKE_SOURCE_DIR}/licensing/third-party-programs.txt + FILES ${PROJECT_SOURCE_DIR}/licensing/third-party-programs.txt DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/licensing/") install(DIRECTORY examples DESTINATION "${CMAKE_INSTALL_DOCDIR}")