Skip to content

Commit d301d9c

Browse files
committed
Make Qt components not required for flexibility between Qt6 and Qt5
1 parent 8b53dac commit d301d9c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
- GENERATOR : "Visual Studio 15 2017"
1111
ARCHITECTURE : ""
1212
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
13-
QTDIR: C:\Qt\5.13.2\msvc2017
13+
QTDIR: C:\Qt\5.15.2\msvc2017
1414
PLATFORM: Win32
1515
- GENERATOR : "MinGW Makefiles"
1616
ARCHITECTURE : ""

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ add_subdirectory(external)
3838

3939
# Find the QtWidgets library
4040
find_package(Qt6
41-
REQUIRED COMPONENTS
41+
COMPONENTS
4242
Core
4343
Widgets
4444
Gui
@@ -47,14 +47,18 @@ find_package(Qt6
4747

4848
if (NOT Qt6_FOUND)
4949
find_package(Qt5 5.15
50-
REQUIRED COMPONENTS
50+
COMPONENTS
5151
Core
5252
Widgets
5353
Gui
5454
OpenGL
5555
)
5656
endif()
5757

58+
if (NOT (Qt6_FOUND OR Qt5_FOUND))
59+
message(FATAL_ERRROR "Qt libraries were not found.")
60+
endif()
61+
5862

5963
qt_add_resources(RESOURCES ./resources/resources.qrc)
6064

0 commit comments

Comments
 (0)