Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ endif()
#
# Set RPATH for custom install prefixes
#
if(APPLE)
if(APPLE AND NOT DO_NOT_SET_RPATH)
set(CMAKE_MACOSX_RPATH 1)
endif()

include(GNUInstallDirs)

if (NOT DEFINED CMAKE_INSTALL_RPATH)
if (NOT DEFINED CMAKE_INSTALL_RPATH AND NOT DO_NOT_SET_RPATH)
if(CMAKE_INSTALL_FULL_LIBDIR)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
else()
Expand Down
3 changes: 3 additions & 0 deletions CMakeOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ option(ENABLE_SYSTEMD
# Rust Targets: https://doc.rust-lang.org/nightly/rustc/platform-support.html
option(RUST_COMPILER_TARGET
"Use a custom target triple to build the Rust components. Needed for cross-compiling.")

option(DO_NOT_SET_RPATH
"Don't set the RPATH on UNIX systems.")
4 changes: 4 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ The following is a complete list of CMake options unique to configuring ClamAV:

_Default: `ON`_

- `DO_NOT_SET_RPATH`: By default RPATH is set in executeables resulting using
paths set at build time instead of using system defaults. By setting this
`ON` system defaults are used.

- `ENABLE_WERROR`: Compile time warnings will cause build failures (i.e.
`-Werror`)

Expand Down