Skip to content

Commit

Permalink
Correctly set CMAKE_INSTALL_MODULEDIR cache variable
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk committed Sep 3, 2021
1 parent 68ec64f commit 0431049
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions config/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# SPDX-Identifier: MIT

option(
CMAKE_INSTALL_MODULEDIR
"Directory in prefix to install generated module files"
"${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}"
)
if(NOT DEFINED CMAKE_INSTALL_MODULEDIR)
set(
CMAKE_INSTALL_MODULEDIR
"${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}-${CMAKE_Fortran_COMPILER_VERSION}"
CACHE
STRING
"Directory in prefix to install generated module files"
)
endif()

# Export a pkg-config file
configure_file(
Expand Down

0 comments on commit 0431049

Please sign in to comment.