Merge "CMakeLists.txt: allow CMAKE_INSTALL_RPATH to be set empty" into main

This commit is contained in:
James Zern 2023-01-18 19:10:44 +00:00 committed by Gerrit Code Review
commit b54d21a01d

View File

@ -101,7 +101,7 @@ endif()
include(cmake/deps.cmake) include(cmake/deps.cmake)
include(GNUInstallDirs) include(GNUInstallDirs)
if(BUILD_SHARED_LIBS AND NOT CMAKE_INSTALL_RPATH) if(BUILD_SHARED_LIBS AND NOT DEFINED CMAKE_INSTALL_RPATH)
# Set the rpath to match autoconf/libtool behavior. Note this must be set # Set the rpath to match autoconf/libtool behavior. Note this must be set
# before target creation. # before target creation.
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")