mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
CMake: set rpath for shared objects
this ensures the correct library is loaded when the install path is not in the default search path; this matches the behavior of autoconf/libtool Change-Id: I7eaa458c353cbdb7f0a1f782a879c59662a5de79
This commit is contained in:
parent
94cd711779
commit
b4994eaa6d
@ -99,6 +99,12 @@ endif()
|
||||
include(cmake/deps.cmake)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(BUILD_SHARED_LIBS AND NOT CMAKE_INSTALL_RPATH)
|
||||
# Set the rpath to match autoconf/libtool behavior. Note this must be set
|
||||
# before target creation.
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
|
||||
# ##############################################################################
|
||||
# Options.
|
||||
if(WEBP_ENABLE_SWAP_16BIT_CSP)
|
||||
|
Loading…
Reference in New Issue
Block a user