-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#207 Prepare a dual q5/qt6 CMake configuration.
Signed-off-by: cneben <[email protected]>
- Loading branch information
Showing
6 changed files
with
76 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.5.0) | ||
|
||
project(QuickQanava VERSION 2.1.0 LANGUAGES CXX) | ||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050F00) | ||
|
||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick REQUIRED) | ||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Qml Quick QuickControls2 REQUIRED) | ||
message("Building with Qt" ${QT_VERSION_MAJOR}) | ||
|
||
option(QUICK_QANAVA_BUILD_SAMPLES "Build the samples" TRUE) | ||
option(QUICK_QANAVA_BUILD_STATIC_QRC "Build *.qrc resources statically" TRUE) | ||
option(QUICK_QANAVA_WINDOWS_DEPLOY "Use windeployqt on Windows" FALSE) | ||
|
||
add_subdirectory(QuickContainers) | ||
add_subdirectory(src) | ||
|
||
if (${QUICK_QANAVA_BUILD_SAMPLES}) | ||
#add_subdirectory(samples/resizer) | ||
#add_subdirectory(samples/navigable) | ||
add_subdirectory(samples/nodes) | ||
add_subdirectory(samples/cpp) | ||
add_subdirectory(samples/edges) | ||
add_subdirectory(samples/connector) | ||
add_subdirectory(samples/groups) | ||
add_subdirectory(samples/selection) | ||
add_subdirectory(samples/style) | ||
add_subdirectory(samples/dataflow) | ||
add_subdirectory(samples/topology) | ||
endif() | ||
|
||
add_subdirectory(exports) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.5.0) | ||
|
||
# Specific to Qt6 | ||
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050F00) | ||
|
||
find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml Quick QuickControls2) | ||
|
||
message("Building QuickQanava with Qt" ${QT_VERSION_MAJOR}) | ||
|
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,33 +1,26 @@ | ||
cmake_minimum_required(VERSION 3.5.0) | ||
|
||
project(QuickQanava VERSION 2.1.0 LANGUAGES CXX) | ||
project(QuickQanava VERSION 2.3.0 LANGUAGES CXX) | ||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Qt6 | ||
add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050F00) | ||
|
||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick REQUIRED) | ||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Qml Quick QuickControls2 REQUIRED) | ||
message("Building with Qt" ${QT_VERSION_MAJOR}) | ||
option(QUICKQANAVA_QT_MAJOR_VERSION "Force Qt Versions to 5 or 6 (default to 6)" 6) | ||
option(QUICKQANAVA_BUILD_SAMPLES "Build the samples" TRUE) | ||
option(QUICKQANAVA_BUILD_STATIC_QRC "Build *.qrc resources statically" TRUE) | ||
option(QUICKQANAVA_WINDOWS_DEPLOY "Use windeployqt on Windows" FALSE) | ||
|
||
option(QUICK_QANAVA_BUILD_SAMPLES "Build the samples" TRUE) | ||
option(QUICK_QANAVA_BUILD_STATIC_QRC "Build *.qrc resources statically" TRUE) | ||
option(QUICK_QANAVA_WINDOWS_DEPLOY "Use windeployqt on Windows" FALSE) | ||
if (${QUICKQANAVA_QT_MAJOR_VERSION} EQUAL 5) | ||
include(CMakeLists.qt5.txt) | ||
else() | ||
include(CMakeLists.qt6.txt) | ||
endif() | ||
|
||
add_subdirectory(QuickContainers) | ||
add_subdirectory(src) | ||
|
||
if (${QUICK_QANAVA_BUILD_SAMPLES}) | ||
#add_subdirectory(samples/resizer) | ||
#add_subdirectory(samples/navigable) | ||
add_subdirectory(samples/nodes) | ||
add_subdirectory(samples/cpp) | ||
add_subdirectory(samples/edges) | ||
add_subdirectory(samples/connector) | ||
add_subdirectory(samples/groups) | ||
add_subdirectory(samples/selection) | ||
add_subdirectory(samples/style) | ||
add_subdirectory(samples/dataflow) | ||
add_subdirectory(samples/topology) | ||
endif() | ||
|
||
add_subdirectory(exports) |
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