Skip to content

Commit

Permalink
build: Generate and install etc/profile.d/mamba.sh for mamba
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
  • Loading branch information
jjerphan committed Jan 3, 2025
1 parent c9c4580 commit d282ddc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
10 changes: 0 additions & 10 deletions mamba_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
17 changes: 16 additions & 1 deletion micromamba/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,19 @@ endif()
# Installation
# ============

install(TARGETS ${mambaexe_targets})
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 ${mambaexe_targets}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
File renamed without changes.

0 comments on commit d282ddc

Please sign in to comment.