Skip to content

Commit

Permalink
Allow specification of an alternate Fortran module install directory (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski authored Sep 11, 2023
1 parent c2079f0 commit 8976232
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,16 @@ install(
EXPORT DBCSRTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
# See https://gitlab.kitware.com/cmake/cmake/-/issues/19608
# CMAKE_INSTALL_Fortran_MODULES is not an "official" cmake variable yet, but
# should be the standard soon
if (NOT CMAKE_INSTALL_Fortran_MODULES)
set(CMAKE_INSTALL_Fortran_MODULES "${CMAKE_INSTALL_INCLUDEDIR}")
endif ()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/dbcsr_api.mod"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
DESTINATION "${CMAKE_INSTALL_Fortran_MODULES}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/dbcsr_tensor_api.mod"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
DESTINATION "${CMAKE_INSTALL_Fortran_MODULES}")

if (WITH_C_API)
install(
Expand Down

0 comments on commit 8976232

Please sign in to comment.