2018-03-23 16:59:38 +01:00
|
|
|
add_subdirectory(cmake)
|
|
|
|
|
2020-09-23 18:10:27 +02:00
|
|
|
if(NOT IS_SUBPROJECT
|
|
|
|
AND NOT CMAKE_INSTALL_PREFIX STREQUAL TRIQS_ROOT
|
|
|
|
AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr"
|
|
|
|
AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr/local"
|
|
|
|
)
|
2018-03-22 18:11:39 +01:00
|
|
|
|
2020-05-07 16:41:30 +02:00
|
|
|
if(PythonSupport)
|
|
|
|
set(EXPORT_PYTHON_PATH "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CPP2PY_PYTHON_LIB_DEST_ROOT}:$PYTHONPATH")
|
|
|
|
set(MODFILE_PYTHON_PATH "prepend-path PYTHONPATH $root/${CPP2PY_PYTHON_LIB_DEST_ROOT}")
|
|
|
|
endif()
|
|
|
|
|
2020-05-28 17:09:35 +02:00
|
|
|
configure_file(${PROJECT_NAME}.modulefile.in ${PROJECT_NAME}.modulefile @ONLY)
|
|
|
|
configure_file(${PROJECT_NAME}vars.sh.in ${PROJECT_NAME}vars.sh @ONLY)
|
2018-03-23 16:59:38 +01:00
|
|
|
|
2018-03-25 19:00:54 +02:00
|
|
|
install(
|
|
|
|
FILES
|
2020-05-28 17:09:35 +02:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.modulefile
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}vars.sh
|
2020-09-23 18:10:27 +02:00
|
|
|
DESTINATION share/${PROJECT_NAME}
|
2018-03-25 19:00:54 +02:00
|
|
|
)
|
2018-03-22 18:11:39 +01:00
|
|
|
|
2020-09-23 18:10:27 +02:00
|
|
|
message(STATUS "*********************************************************************************")
|
|
|
|
message(STATUS "* Custom install Location. Use: ")
|
|
|
|
message(STATUS "* ")
|
|
|
|
message(STATUS "* source ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/${PROJECT_NAME}vars.sh ")
|
|
|
|
message(STATUS "* ")
|
|
|
|
message(STATUS "* to set up the environment variables ")
|
|
|
|
if(DEFINED ENV{MODULEPATH})
|
|
|
|
message(STATUS "* ")
|
|
|
|
message(STATUS "* Consider copying ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.modulefile ")
|
|
|
|
message(STATUS "* into your environment module directories ")
|
|
|
|
endif()
|
|
|
|
message(STATUS "*********************************************************************************")
|
2018-03-22 18:11:39 +01:00
|
|
|
|
|
|
|
endif()
|