-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace Qt_VERSION_MAJOR with the more standard QT_VERSION_MAJOR
- Loading branch information
1 parent
18d29f7
commit 6b9d75b
Showing
8 changed files
with
24 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# | ||
# SPDX-FileCopyrightText: 2016-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | ||
# Author: Allen Winter <[email protected]> | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
|
||
# Assumes you've already found Qt and Qt_VERSION_MAJOR 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_VERSION_MAJOR) | ||
message(FATAL_ERROR "Please set Qt_VERSION_MAJOR first (ie. set(Qt_VERSION_MAJOR 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_VERSION_MAJOR}::qmake) | ||
get_target_property(QT_QMAKE_EXECUTABLE Qt${Qt_VERSION_MAJOR}::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() | ||
|
@@ -46,7 +46,10 @@ foreach(qval ${VARS_LIST}) | |
list(GET QVAL_LIST 1 path) | ||
endif() | ||
if(NOT ${var}) #if set already on the command line for example | ||
set(${var} ${path} CACHE PATH "Qt install path for ${var}") | ||
set(${var} | ||
${path} | ||
CACHE PATH "Qt install path for ${var}" | ||
) | ||
endif() | ||
endif() | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters