]> granicus.if.org Git - libevent/commitdiff
Fixed CMake configuration failure (libevent#1321)
authorBorys Smejda <borys.smejda@gmail.com>
Sat, 13 Aug 2022 17:10:10 +0000 (19:10 +0200)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sat, 13 Aug 2022 18:15:06 +0000 (20:15 +0200)
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.

CMakeLists.txt

index 5016840ca27752cfb655d9e2a65b140dd7fcab6d..3421ca608abc4e94dee3752f47f4447666e9ad30 100644 (file)
@@ -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")