Skip to content

Allow custom CMAKE_INSTALL_RPATH#768

Merged
val-ms merged 1 commit intoCisco-Talos:mainfrom
antchan2:allow_custom_rpath
Nov 18, 2022
Merged

Allow custom CMAKE_INSTALL_RPATH#768
val-ms merged 1 commit intoCisco-Talos:mainfrom
antchan2:allow_custom_rpath

Conversation

@antchan2
Copy link
Contributor

@antchan2 antchan2 commented Nov 18, 2022

When building ClamAV libraries for integration, it is not unusual for the shared library files to be installed in a directory that is convenient in the build environment, but deploy them in a different directory.

E.g., The build environment may install to:

/home/build-user/clamav-devel/linux-x86_64/lib64/

But it may be necessary to deploy to:

/opt/app/lib

ClamAV's default behaviour is to set RPATH to the absolute path of the build environment's "lib" directory. This make those files difficult to deploy without patching.

It is more flexible if integrators have full control over RPATH. This change allows integrators to set CMAKE_INSTALL_RPATH and override the default behaviour.

Reference: CMake Wiki RPATH Handling

Copy link
Contributor

@val-ms val-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@val-ms val-ms merged commit 5366404 into Cisco-Talos:main Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants