mirror of https://github.com/mamba-org/mamba.git
build: Generate and install `etc/profile.d/mamba.sh` for mamba (#3723)
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz> Co-authored-by: Klaim <Klaim@users.noreply.github.com>
This commit is contained in:
parent
4f97739aed
commit
d1786964f9
|
@ -38,16 +38,6 @@ target_link_libraries(mamba-package PRIVATE mamba::libmamba)
|
|||
|
||||
set_target_properties(mamba-package PROPERTIES CXX_STANDARD 17)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/etc/profile.d/mamba.sh.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/etc/profile.d/mamba.sh"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/etc/profile.d/mamba.sh
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/profile.d/
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS mamba-package
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
|
|
|
@ -105,4 +105,23 @@ endif()
|
|||
# Installation
|
||||
# ============
|
||||
|
||||
install(TARGETS ${mambaexe_targets})
|
||||
# This profile script is only needed for mamba on Unix systems.
|
||||
if(BUILD_SHARED AND UNIX)
|
||||
message(STATUS "Generating profile script for mamba (i.e. `etc/profile.d/mamba.sh`)")
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/etc/profile.d/mamba.sh.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/etc/profile.d/mamba.sh"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/etc/profile.d/mamba.sh
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/profile.d/
|
||||
)
|
||||
endif()
|
||||
|
||||
install(
|
||||
TARGETS ${mambaexe_targets}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue