Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 13f4c856 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

env.sh: Install the env.sh file only if we use a non default directory to install the package

parent 4755276f
No related branches found
No related tags found
1 merge request!67Install the env.sh file only if we use a non default directory to install the package
...@@ -230,8 +230,16 @@ macro(generate_env_file) ...@@ -230,8 +230,16 @@ macro(generate_env_file)
# installation # installation
# ------------ # ------------
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bin/${LONAME}_env.sh" # Check if the PREFIX is in the PATH or not
DESTINATION bin) # If yes, no need to install this file
string(REPLACE ":" ";" pathlist "$ENV{PATH}")
if ( "${CMAKE_INSTALL_PREFIX}/bin" IN_LIST pathlist )
message( STATUS "No installation of ${LONAME}_env.sh - already in the default environment" )
else ()
message( STATUS "Install ${LONAME}_env.sh in ${CMAKE_INSTALL_PREFIX}/bin" )
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bin/${LONAME}_env.sh"
DESTINATION bin)
endif()
endmacro(generate_env_file) endmacro(generate_env_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment