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

Packaging improvements #278

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ IF(KMC_MDB_DB)
ENDIF(KMC_MDB_DB)

if(SYSTEM_INSTALL)
set(CMAKE_INSTALL_PREFIX /usr/local)
# The library will be installed to /usr/local unless overridden with
# -DCMAKE_INSTALL_PREFIX=/some/path
# See https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html
elseif(NOT DEFINED CFE_SYSTEM_PSPNAME)
# Not cFE / cFS
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
Expand Down
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ endif()

file(GLOB CRYPTO_INCLUDES ../include/*.h)
set_target_properties(crypto PROPERTIES PUBLIC_HEADER "${CRYPTO_INCLUDES}")
# This causes the library to be installed as libcryptolib.so while still being
# referred to as crypto from CMake. Without this, the library filename would be
# libcrypto.so which would conflict with openssl
set_target_properties(crypto PROPERTIES OUTPUT_NAME "cryptolib")

add_custom_command(TARGET crypto POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:crypto> ${PROJECT_BINARY_DIR}/lib/libcrypto.so
Expand Down
Loading