diff options
Diffstat (limited to 'src/corelib/Qt5CoreConfigExtras.cmake.in')
-rw-r--r-- | src/corelib/Qt5CoreConfigExtras.cmake.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index 9b672327ef..4c1c3a612b 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -1,3 +1,6 @@ +if(NOT DEFINED QT_DEFAULT_MAJOR_VERSION) + set(QT_DEFAULT_MAJOR_VERSION 5) +endif() if (NOT TARGET Qt5::qmake) add_executable(Qt5::qmake IMPORTED) @@ -177,3 +180,24 @@ if (ANDROID_PLATFORM) endif() _qt5_Core_check_file_exists(${_Qt5CTestMacros}) + +# Create versionless tool targets. +foreach(__qt_tool qmake moc rcc) + if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::${__qt_tool} + AND TARGET Qt5::${__qt_tool}) + add_executable(Qt::${__qt_tool} IMPORTED) + get_target_property(__qt_imported_location Qt5::${__qt_tool} IMPORTED_LOCATION) + set_target_properties(Qt::${__qt_tool} + PROPERTIES IMPORTED_LOCATION \"${__qt_imported_location}\") + endif() +endforeach() + +!!IF !isEmpty(CMAKE_WINDOWS_BUILD) +# Add a versionless target for WinMain. +if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::WinMain) + add_library(Qt::WinMain INTERFACE IMPORTED) + set_target_properties(Qt::WinMain PROPERTIES + INTERFACE_LINK_LIBRARIES \"Qt5::WinMain\" + ) +endif() +!!ENDIF |