CMake: Add Qt6 forward compatible CMake API

Task-number: QTBUG-74137
Task-number: QTBUG-80477
Change-Id: Iaf88de57dd25f0a28c153667593203f75b6c472c
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Alexandru Croitor 2019-12-05 13:30:26 +01:00
parent 0c2a2e14b1
commit 8746293524
1 changed files with 10 additions and 0 deletions

View File

@ -182,3 +182,13 @@ but this file does not exist. Possible reasons include:
endif()
!!ENDIF // !isEmpty(CMAKE_STATIC_TYPE)
endfunction()
if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
function(qt_import_qml_plugins)
if(QT_DEFAULT_MAJOR_VERSION EQUAL 5)
qt5_import_qml_plugins(${ARGV})
elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6)
qt6_import_qml_plugins(${ARGV})
endif()
endfunction()
endif()