File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -32,24 +32,28 @@ jobs:
3232 compiler : gcc
3333 qt_version : " 5.15.2"
3434 modules : " "
35+ use_qt6 : " OFF"
3536
3637 - toolchain : macos-clang
3738 os : macos-latest
3839 compiler : clang
3940 qt_version : " 5.15.2"
4041 modules : " "
42+ use_qt6 : " OFF"
4143
4244 - toolchain : windows-msvc
4345 os : windows-latest
4446 compiler : msvc
4547 qt_version : " 5.15.2"
4648 modules : " "
49+ use_qt6 : " OFF"
4750
4851 - toolchain : windows-msvc
4952 os : windows-latest
5053 compiler : msvc
5154 qt_version : " 6.3.0"
5255 modules : " qt5compat"
56+ use_qt6 : " ON"
5357
5458 steps :
5559 - name : Checkout Code
7478 arch : x64
7579
7680 - name : Configure (${{ matrix.configuration }})
77- run : cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_DOCS=OFF
81+ run : cmake -S . -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_DOCS=OFF -DUSE_QT6=${{ matrix.use_qt6 }}
7882
7983 - name : Build with ${{ matrix.compiler }}
8084 run : cmake --build build --config ${{ matrix.configuration }}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ option(BUILD_DOCS "Build Documentation" "${QT_NODES_DEVELOPER_DEFAULTS}")
2828option (BUILD_SHARED_LIBS "Build as shared library" ON )
2929option (BUILD_DEBUG_POSTFIX_D "Append d suffix to debug libraries" OFF )
3030option (QT_NODES_FORCE_TEST_COLOR "Force colorized unit test output" OFF )
31+ option (USE_QT6 "Build with Qt6 (Enabled by default)" ON )
3132
3233enable_testing ()
3334
@@ -46,7 +47,12 @@ endif()
4647
4748add_subdirectory (external)
4849
49- find_package (QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
50+ if (USE_QT6)
51+ find_package (QT NAMES Qt6 REQUIRED COMPONENTS Widgets)
52+ else ()
53+ find_package (QT NAMES Qt5 REQUIRED COMPONENTS Widgets)
54+ endif ()
55+
5056find_package (Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets Gui OpenGL)
5157message (STATUS "QT_VERSION: ${QT_VERSION} , QT_DIR: ${QT_DIR} " )
5258
Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ Current State (v3)
103103Building
104104========
105105
106+ Set this option to false if you want to build with Qt5 version instead of Qt6:
107+
108+ ::
109+
110+ USE_QT6
111+
112+ mkdir build && cd build && cmake .. -DUSE_QT6=on
113+ or
114+ mkdir build && cd build && cmake .. -DUSE_QT6=off
115+
106116Linux
107117-----
108118
You can’t perform that action at this time.
0 commit comments