Don't emit the CMake rpath warning for CMake >= 3.14

Fixes #2114.
This commit is contained in:
heinrich5991 2020-04-07 12:01:18 +02:00
parent a7042f7139
commit cac164cc71

View file

@ -1152,8 +1152,10 @@ list(APPEND TARGETS_OWN ${TARGET_SERVER})
list(APPEND TARGETS_LINK ${TARGET_SERVER}) list(APPEND TARGETS_LINK ${TARGET_SERVER})
if(ANTIBOT) if(ANTIBOT)
if(CMAKE_VERSION VERSION_LESS 3.14 AND (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)) 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") set_property(TARGET ${TARGET_SERVER} PROPERTY BUILD_RPATH "$ORIGIN")
endif()
else() 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...") 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() endif()