2117: Don't emit the CMake rpath warning for CMake >= 3.14 r=def- a=heinrich5991

Fixes #2114.

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
bors[bot] 2020-04-07 10:50:51 +00:00 committed by GitHub
commit 0c51c0daf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1155,8 +1155,10 @@ list(APPEND TARGETS_OWN ${TARGET_SERVER})
list(APPEND TARGETS_LINK ${TARGET_SERVER})
if(ANTIBOT)
if(CMAKE_VERSION VERSION_LESS 3.14 AND (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8))
set_property(TARGET ${TARGET_SERVER} PROPERTY BUILD_RPATH "$ORIGIN")
if(CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
if(CMAKE_VERSION VERSION_LESS 3.14)
set_property(TARGET ${TARGET_SERVER} PROPERTY BUILD_RPATH "$ORIGIN")
endif()
else()
message(STATUS "Can't set BUILD_RPATH in CMake before 3.8, pass -Wl,-rpath,'$ORIGIN' manually if you wish to emulate this. Or just install a newer version of CMake...")
endif()