Skip to content

Commit

Permalink
add CMake option INSTALL_MODULES (#921)
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
  • Loading branch information
njzjz authored Dec 6, 2023
1 parent 74d1639 commit 0eace6f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

cmake_minimum_required(VERSION 3.17)
option(WITH_OBJECT "To build using object library" TRUE)
option(INSTALL_MODULES "Install Fortran module files to include directory." FALSE)

# Buggy CMake versions
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.27.0)
Expand Down Expand Up @@ -249,6 +250,15 @@ install(
"${CMAKE_INSTALL_INCLUDEDIR}"
)

if (INSTALL_MODULES)
install(
DIRECTORY
"${PROJECT_BINARY_DIR}/include/"
DESTINATION
"${CMAKE_INSTALL_INCLUDEDIR}"
)
endif()

# xtb-parameters
install(
FILES
Expand Down

0 comments on commit 0eace6f

Please sign in to comment.