Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional prefix to installation paths #235

Merged
merged 4 commits into from
Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,16 @@ set_target_properties(mscclpp_static PROPERTIES VERSION ${MSCCLPP_VERSION} SOVER
add_subdirectory(include)
add_subdirectory(src)

if("${INSTALL_PREFIX}" STREQUAL "")
set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
endif()

install(TARGETS mscclpp_obj
FILE_SET HEADERS DESTINATION include)
FILE_SET HEADERS DESTINATION ${INSTALL_PREFIX}/include)
install(TARGETS mscclpp
LIBRARY DESTINATION lib)
LIBRARY DESTINATION ${INSTALL_PREFIX}/lib)
install(TARGETS mscclpp_static
ARCHIVE DESTINATION lib)
ARCHIVE DESTINATION ${INSTALL_PREFIX}/lib)

# Tests
if(BUILD_TESTS)
Expand Down
Loading