From cac164cc714be04ca26300086a9b130fafb69606 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Tue, 7 Apr 2020 12:01:18 +0200 Subject: [PATCH] Don't emit the CMake rpath warning for CMake >= 3.14 Fixes #2114. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e24ac294b..94511e837 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1152,8 +1152,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()