cmake/KDAB/modules/KDQtInstallPaths.cmake - sync

This commit is contained in:
Allen Winter
2021-08-04 16:17:27 -04:00
parent d5191696e1
commit 8e19b81eb9

View File

@@ -5,19 +5,19 @@
# SPDX-License-Identifier: BSD-3-Clause
#
# Assumes you've already found Qt and QT_MAJOR_VERSION is set
# Assumes you've already found Qt and Qt_VERSION_MAJOR is set
#
# Create variables for all the various install paths for the Qt version in use
# Make sure to have found Qt before using this.
# sets variables like QT_INSTALL_PREFIX, QT_INSTALL_DATA, QT_INSTALL_DOCS, etc.
# run qmake -query to see a full list
if(NOT DEFINED QT_MAJOR_VERSION)
message(FATAL_ERROR "Please set QT_MAJOR_VERSION first (ie. set(QT_MAJOR_VERSION 5))")
if(NOT DEFINED Qt_VERSION_MAJOR)
message(FATAL_ERROR "Please set Qt_VERSION_MAJOR first (ie. set(Qt_VERSION_MAJOR 5))")
endif()
if(TARGET Qt${QT_MAJOR_VERSION}::qmake)
get_target_property(QT_QMAKE_EXECUTABLE Qt${QT_MAJOR_VERSION}::qmake LOCATION)
if(TARGET Qt${Qt_VERSION_MAJOR}::qmake)
get_target_property(QT_QMAKE_EXECUTABLE Qt${Qt_VERSION_MAJOR}::qmake LOCATION)
else()
message(FATAL_ERROR "No supported Qt version found. Make sure you find Qt before calling this")
endif()