diff --git a/scripts/cmake/Functions.cmake b/scripts/cmake/Functions.cmake
index 45a8165fba4052a2ff9b459b5dfd35341fb22625..7d78cbcf6488ae4c43543429af622a24bdf76054 100644
--- a/scripts/cmake/Functions.cmake
+++ b/scripts/cmake/Functions.cmake
@@ -84,8 +84,7 @@ endfunction()
 # Replacement for add_library() for ogs targets
 function(ogs_add_library targetName)
     foreach(file ${ARGN})
-        # cmake-lint: disable=E1126
-        file(REAL_PATH ${file} file_path)
+        get_filename_component(file_path ${file} REALPATH)
         list(APPEND files ${file_path})
     endforeach()