diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index 866ace6c5c..4f342d67d7 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -252,7 +252,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) endif() endforeach() - if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST) + if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST + AND NOT CMAKE_VERSION VERSION_LESS 3.0.0 ) add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}