From: Borys Smejda Date: Sat, 13 Aug 2022 17:10:10 +0000 (+0200) Subject: Fixed CMake configuration failure (libevent#1321) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86b5d2e951eaa88cb5fed2be23fa5af85facad4a;p=libevent Fixed CMake configuration failure (libevent#1321) Deleted usage of CMake feature 'file(REAL_PATH' which is available from version 3.19 with an old 'get_filename_component' so that older version of CMake can still be used to configure the project. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5016840c..3421ca60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,8 +178,8 @@ macro(Configure_RPATH) # - "///" -> "/" # - "/////usr///" -> "//usr" # So it should be normalized again. - file(REAL_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX_NORMALIZED) + get_filename_component(CMAKE_INSTALL_PREFIX_NORMALIZED "${CMAKE_INSTALL_PREFIX}" REALPATH) list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX_NORMALIZED}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1")