diff --git a/CMakeLists.txt b/CMakeLists.txt index 5016840ca2..3421ca608a 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")