From 0c423645c63ad9cc29f3eb97a89feee3e0628c1f Mon Sep 17 00:00:00 2001 From: Pradipta Samanta <samanta@dkrz.de> Date: Thu, 29 Aug 2024 10:08:37 +0000 Subject: [PATCH] Fixed installation; other projects can now find module files from fortran-support (icon-libraries/libfortran-support!95) ## What is the bug Any projects dependent on fortran-support are not able to find the associated module files of when the fortran-support is installed in the system ## How do you fix it `CMAKE_INSTALL_PREFIX` was not used to define `INSTALL_INTERFACE`. I corrected it now. Approved-by: Yen-Chen Chen <yen-chen.chen@kit.edu> Merged-by: Yen-Chen Chen <yen-chen.chen@kit.edu> Changelog: bugfix --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fc3c7d6..08134de 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -107,7 +107,7 @@ target_include_directories( PUBLIC # Path to the Fortran modules: $<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:${Fortran_MODULE_DIRECTORY}>> - $<INSTALL_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:${CMAKE_INSTALL_INCLUDEDIR}>> + $<INSTALL_INTERFACE:$<$<COMPILE_LANGUAGE:Fortran>:${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}>> INTERFACE # Path to the internal C/C++ headers (for testing): Requires CMake 3.15+ for # multiple compile languages -- GitLab