Skip to content

Commit 39329b7

Browse files
author
Allen Winter
committed
KDQtInstallPaths.cmake - sync to upstream
In particular, use QT_VERSION_MAJOR and remove Qt_VERSION_MAJOR
1 parent 2fe29d1 commit 39329b7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ if(${PROJECT_NAME}_TESTS)
110110
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
111111
endif()
112112

113-
set(Qt_VERSION_MAJOR ${QT_VERSION_MAJOR}) # KDQtInstallPaths wants "Qt", not "QT"
114113
include(KDQtInstallPaths) #to set QT_INSTALL_FOO variables
115114

116115
add_definitions(

cmake/KDAB/modules/KDQtInstallPaths.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
# SPDX-License-Identifier: BSD-3-Clause
66
#
77

8-
# Assumes you've already found Qt and Qt_VERSION_MAJOR is set
8+
# Assumes you've already found Qt and QT_VERSION_MAJOR is set
99
#
1010
# Create variables for all the various install paths for the Qt version in use
1111
# Make sure to have found Qt before using this.
1212
# sets variables like QT_INSTALL_PREFIX, QT_INSTALL_DATA, QT_INSTALL_DOCS, etc.
1313
# run qmake -query to see a full list
1414

15-
if(NOT DEFINED Qt_VERSION_MAJOR)
16-
message(FATAL_ERROR "Please set Qt_VERSION_MAJOR first (ie. set(Qt_VERSION_MAJOR 5))")
15+
if(NOT DEFINED QT_VERSION_MAJOR)
16+
message(FATAL_ERROR "Please set QT_VERSION_MAJOR first (ie. set(QT_VERSION_MAJOR 5))")
1717
endif()
1818

19-
if(TARGET Qt${Qt_VERSION_MAJOR}::qmake)
20-
get_target_property(QT_QMAKE_EXECUTABLE Qt${Qt_VERSION_MAJOR}::qmake LOCATION)
19+
if(TARGET Qt${QT_VERSION_MAJOR}::qmake)
20+
get_target_property(QT_QMAKE_EXECUTABLE Qt${QT_VERSION_MAJOR}::qmake LOCATION)
2121
else()
2222
message(FATAL_ERROR "No supported Qt version found. Make sure you find Qt before calling this")
2323
endif()

0 commit comments

Comments
 (0)