mirror of
https://github.com/triqs/dft_tools
synced 2025-01-05 10:59:34 +01:00
[cmake] Install app4triqsvars.sh into subdirectory of share only for non-system install prefix
This commit is contained in:
parent
5cf590e440
commit
d76a28c80a
@ -25,7 +25,7 @@ Installation steps
|
|||||||
|
|
||||||
#. Ensure that your shell contains the TRIQS environment variables by sourcing the ``triqsvars.sh`` file from your TRIQS installation::
|
#. Ensure that your shell contains the TRIQS environment variables by sourcing the ``triqsvars.sh`` file from your TRIQS installation::
|
||||||
|
|
||||||
$ source path_to_triqs/share/triqsvarsh.sh
|
$ source path_to_triqs/share/triqs/triqsvars.sh
|
||||||
|
|
||||||
#. In the build directory call cmake, including any additional custom CMake options, see below::
|
#. In the build directory call cmake, including any additional custom CMake options, see below::
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
add_subdirectory(cmake)
|
add_subdirectory(cmake)
|
||||||
|
|
||||||
if(NOT CMAKE_INSTALL_PREFIX STREQUAL TRIQS_ROOT AND NOT IS_SUBPROJECT)
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
if(PythonSupport)
|
if(PythonSupport)
|
||||||
set(EXPORT_PYTHON_PATH "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CPP2PY_PYTHON_LIB_DEST_ROOT}:$PYTHONPATH")
|
set(EXPORT_PYTHON_PATH "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CPP2PY_PYTHON_LIB_DEST_ROOT}:$PYTHONPATH")
|
||||||
@ -14,15 +18,20 @@ if(NOT CMAKE_INSTALL_PREFIX STREQUAL TRIQS_ROOT AND NOT IS_SUBPROJECT)
|
|||||||
FILES
|
FILES
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.modulefile
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.modulefile
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}vars.sh
|
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}vars.sh
|
||||||
DESTINATION share
|
DESTINATION share/${PROJECT_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
message(STATUS "***************************************************************")
|
message(STATUS "*********************************************************************************")
|
||||||
message(STATUS "* Custom install Location. Use: ")
|
message(STATUS "* Custom install Location. Use: ")
|
||||||
message(STATUS "* ")
|
message(STATUS "* ")
|
||||||
message(STATUS "* source ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}vars.sh ")
|
message(STATUS "* source ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/${PROJECT_NAME}vars.sh ")
|
||||||
message(STATUS "* ")
|
message(STATUS "* ")
|
||||||
message(STATUS "* to set up the environment variables ")
|
message(STATUS "* to set up the environment variables ")
|
||||||
message(STATUS "***************************************************************")
|
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 "*********************************************************************************")
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user