diff --git a/mkspecs/features/cmake_functions.prf b/mkspecs/features/cmake_functions.prf index fac73b464c..a9b0c86cad 100644 --- a/mkspecs/features/cmake_functions.prf +++ b/mkspecs/features/cmake_functions.prf @@ -63,3 +63,8 @@ defineReplace(cmakeProcessLibs) { } return ($$join(out, ";")) } + +defineReplace(cmakeRelativePath) { + path = $$relative_path($$1, $$2) + return($$replace(path, ([^/])$, \\1/)) +} diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 7a200056ae..58a0620e01 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -11,11 +11,6 @@ load(cmake_functions) -defineReplace(cmakeRelativePath) { - path = $$relative_path($$1, $$2) - return($$replace(path, ([^/])$, \\1/)) -} - CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE}) CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.))