diff options
Diffstat (limited to 'cmake/QtBuild.cmake')
-rw-r--r-- | cmake/QtBuild.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 85e437033b..da43d5bc56 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -494,5 +494,8 @@ if(ANDROID) include(QtAndroidHelpers) endif() -# This sets up the scope finalizer mechanism. -variable_watch(CMAKE_CURRENT_LIST_DIR qt_watch_current_list_dir) +# This sets up the poor man's scope finalizer mechanism. +# For newer CMake versions, we use cmake_language(DEFER CALL) instead. +if(CMAKE_VERSION VERSION_LESS "3.19.0") + variable_watch(CMAKE_CURRENT_LIST_DIR qt_watch_current_list_dir) +endif() |