Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename WITH_QT6 to BUILD_WITH_QT6
  • Loading branch information
m-kuhn authored and nyalldawson committed Jul 11, 2022
1 parent cce558b commit 6e37485
Show file tree
Hide file tree
Showing 32 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .ci/run_tests.sh
Expand Up @@ -91,7 +91,7 @@ else
--env-file .docker/docker-variables.env \
--env PUSH_TO_CDASH=false \
--env WITH_QT5=true \
--env WITH_QT6=false \
--env BUILD_WITH_QT6=false \
--env WITH_QUICK=false \
--env WITH_3D=false \
--env PATCH_QT_3D=false \
Expand Down
4 changes: 2 additions & 2 deletions .docker/docker-qgis-build.sh
Expand Up @@ -52,7 +52,7 @@ if [[ "${WITH_CLAZY}" = "ON" ]]; then
export CLAZY_IGNORE_DIRS="(.*/external/.*)|(.*sip_.*part.*)"
fi

if [[ ${WITH_QT6} = "ON" ]]; then
if [[ ${BUILD_WITH_QT6} = "ON" ]]; then
CLANG_WARNINGS="-Wrange-loop-construct"
fi

Expand All @@ -76,7 +76,7 @@ cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DUSE_CCACHE=OFF \
-DWITH_QT6=${WITH_QT6} \
-DBUILD_WITH_QT6=${BUILD_WITH_QT6} \
-DWITH_DESKTOP=${WITH_QT5} \
-DWITH_ANALYSIS=ON \
-DWITH_GUI=${WITH_QT5} \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Expand Up @@ -174,7 +174,7 @@ jobs:
--env-file .docker/docker-variables.env \
--env PUSH_TO_CDASH=true \
--env WITH_QT5=${{ matrix.with-qt5 }} \
--env WITH_QT6=${{ matrix.with-qt6 }} \
--env BUILD_WITH_QT6=${{ matrix.with-qt6 }} \
--env WITH_QUICK=${{ matrix.with-quick }} \
--env WITH_3D=${{ matrix.with-3d }} \
--env PATCH_QT_3D=${{ matrix.patch-qt-3d }} \
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Expand Up @@ -441,8 +441,8 @@ if(WITH_CORE)
#############################################################
# search for Qt

set (WITH_QT6 FALSE CACHE BOOL "Enable (broken, experimental) Qt6 support")
if (WITH_QT6)
set (BUILD_WITH_QT6 FALSE CACHE BOOL "Enable (broken, experimental) Qt6 support")
if (BUILD_WITH_QT6)
set(QT_MIN_VERSION 6.0.0)
set(QT_VERSION_BASE "Qt6")
else()
Expand All @@ -462,7 +462,7 @@ if(WITH_CORE)
endif()

find_package(${QT_VERSION_BASE} COMPONENTS Core Gui Widgets Network Xml Svg Concurrent Test UiTools Sql REQUIRED)
if (WITH_QT6)
if (BUILD_WITH_QT6)
find_package(${QT_VERSION_BASE} COMPONENTS Core5Compat REQUIRED)
else()
# TODO only available starting from Qt 6.2
Expand All @@ -473,7 +473,7 @@ if(WITH_CORE)
else()
add_definitions(-DQT_NO_PRINTER)
endif()
if (WITH_QTWEBKIT AND NOT WITH_QT6)
if (WITH_QTWEBKIT AND NOT BUILD_WITH_QT6)
find_package(Qt5WebKit REQUIRED)
find_package(Qt5WebKitWidgets REQUIRED)
endif()
Expand All @@ -491,7 +491,7 @@ if(WITH_CORE)
EXEC_PROGRAM(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_PLUGINS" RETURN_VALUE return_code OUTPUT_VARIABLE DEFAULT_QT_PLUGINS_DIR )
set (QT_PLUGINS_DIR ${DEFAULT_QT_PLUGINS_DIR} CACHE STRING "Path to installation directory for Qt Plugins. Defaults to Qt native plugin directory")

if (WITH_QT6)
if (BUILD_WITH_QT6)
message(STATUS "Found Qt version: ${Qt6Core_VERSION}")
else()
message(STATUS "Found Qt version: ${Qt5Core_VERSION_STRING}")
Expand Down Expand Up @@ -975,7 +975,7 @@ message("-- Found Python executable: ${Python_EXECUTABLE} (version ${Python_VERS
message("-- Python library: ${Python_LIBRARIES}")
message("-- Python site-packages: ${Python_SITEARCH}")

if (WITH_CORE AND WITH_BINDINGS AND NOT WITH_QT6)
if (WITH_CORE AND WITH_BINDINGS AND NOT BUILD_WITH_QT6)
set(PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python)
set (QGIS_PYTHON_OUTPUT_DIRECTORY ${PYTHON_OUTPUT_DIRECTORY}/qgis)

Expand Down
4 changes: 2 additions & 2 deletions src/3d/CMakeLists.txt
Expand Up @@ -203,7 +203,7 @@ add_library(qgis_3d SHARED ${QGIS_3D_SRCS} ${QGIS_3D_HDRS} ${QGIS_3D_RCCS} ${QGI
# require c++17
target_compile_features(qgis_3d PRIVATE cxx_std_17)

if (WITH_QT6)
if (BUILD_WITH_QT6)
target_include_directories(qgis_3d SYSTEM PUBLIC
${QT6_3DEXTRA_INCLUDE_DIR}
)
Expand All @@ -228,7 +228,7 @@ target_include_directories(qgis_3d PUBLIC
${CMAKE_SOURCE_DIR}/external/delaunator-cpp
)

if (WITH_QT6)
if (BUILD_WITH_QT6)
target_link_libraries(qgis_3d Qt6::3DCore Qt6::3DRender Qt6::3DInput Qt6::3DLogic Qt6::3DExtras)
else()
target_link_libraries(qgis_3d Qt5::3DCore Qt5::3DRender Qt5::3DInput Qt5::3DLogic Qt5::3DExtras)
Expand Down
2 changes: 1 addition & 1 deletion src/auth/apiheader/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ if (WITH_GUI)
gui/qgsauthapiheaderedit.h
)
set(AUTH_APIHEADER_UIS gui/qgsauthapiheaderedit.ui)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_APIHEADER_UIS_H ${AUTH_APIHEADER_UIS})
else()
QT5_WRAP_UI(AUTH_APIHEADER_UIS_H ${AUTH_APIHEADER_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/auth/basic/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ if (WITH_GUI)
gui/qgsauthbasicedit.h
)
set(AUTH_BASIC_UIS gui/qgsauthbasicedit.ui)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_BASIC_UIS_H ${AUTH_BASIC_UIS})
else()
QT5_WRAP_UI(AUTH_BASIC_UIS_H ${AUTH_BASIC_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/auth/esritoken/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ if (WITH_GUI)
gui/qgsauthesritokenedit.h
)
set(AUTH_ESRITOKEN_UIS gui/qgsauthesritokenedit.ui)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_ESRITOKEN_UIS_H ${AUTH_ESRITOKEN_UIS})
else()
QT5_WRAP_UI(AUTH_ESRITOKEN_UIS_H ${AUTH_ESRITOKEN_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/auth/identcert/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ if (WITH_GUI)
gui/qgsauthidentcertedit.h
)
set(AUTH_IDENTCERT_UIS gui/qgsauthidentcertedit.ui)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_IDENTCERT_UIS_H ${AUTH_IDENTCERT_UIS})
else()
QT5_WRAP_UI(AUTH_IDENTCERT_UIS_H ${AUTH_IDENTCERT_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/auth/maptiler_hmacsha256/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ if (WITH_GUI)
gui/qgsauthmaptilerhmacsha256edit.h
)
set(AUTH_MAPTILER_HMACSHA256_UIS gui/qgsauthmaptilerhmacsha256edit.ui)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_MAPTILER_HMACSHA256_UIS_H ${AUTH_MAPTILER_HMACSHA256_UIS})
else()
QT5_WRAP_UI(AUTH_MAPTILER_HMACSHA256_UIS_H ${AUTH_MAPTILER_HMACSHA256_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/auth/pkipaths/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ if (WITH_GUI)
gui/qgsauthpkipathsedit.h
)
set(AUTH_PKIPATHS_UIS gui/qgsauthpkipathsedit.ui)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_PKIPATHS_UIS_H ${AUTH_PKIPATHS_UIS})
else()
QT5_WRAP_UI(AUTH_PKIPATHS_UIS_H ${AUTH_PKIPATHS_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/auth/pkipkcs12/CMakeLists.txt
Expand Up @@ -16,7 +16,7 @@ if (WITH_GUI)
gui/qgsauthpkcs12edit.h
)
set(AUTH_PKCS12_UIS gui/qgsauthpkcs12edit.ui)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_PKCS12_UIS_H ${AUTH_PKCS12_UIS})
else()
QT5_WRAP_UI(AUTH_PKCS12_UIS_H ${AUTH_PKCS12_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/core/CMakeLists.txt
Expand Up @@ -2295,7 +2295,7 @@ if (WITH_SPATIALITE)
target_link_libraries(qgis_core ${SPATIALITE_LIBRARY})
endif()

if (WITH_QT6)
if (BUILD_WITH_QT6)
target_link_libraries(qgis_core Qt6::Core5Compat)
endif()

Expand Down
2 changes: 1 addition & 1 deletion src/crashhandler/CMakeLists.txt
Expand Up @@ -2,7 +2,7 @@ include_directories(SYSTEM
${CMAKE_CURRENT_BINARY_DIR}
)

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(CRASH_UIS_H qgscrashdialog.ui)
QT6_WRAP_CPP(CRASH_HDR_MOC qgscrashdialog.h)
else()
Expand Down
2 changes: 1 addition & 1 deletion src/customwidgets/CMakeLists.txt
Expand Up @@ -98,7 +98,7 @@ include_directories(SYSTEM
${${QT_VERSION_BASE}Designer_INCLUDE_DIRS}
)

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_CPP(QGIS_CUSTOMWIDGETS_MOC_SRCS ${QGIS_CUSTOMWIDGETS_MOC_HDRS})
else()
QT5_WRAP_CPP(QGIS_CUSTOMWIDGETS_MOC_SRCS ${QGIS_CUSTOMWIDGETS_MOC_HDRS})
Expand Down
6 changes: 3 additions & 3 deletions src/gui/CMakeLists.txt
Expand Up @@ -1354,7 +1354,7 @@ set(QGIS_GUI_PRIVATE_HDRS
attributetable/qgsfeaturefilterwidget_p.h
)

if (WITH_QT6)
if (BUILD_WITH_QT6)
find_package(Qt6 COMPONENTS Qml QuickWidgets REQUIRED)
else()
find_package(Qt5 COMPONENTS Qml QuickWidgets REQUIRED)
Expand Down Expand Up @@ -1505,7 +1505,7 @@ target_include_directories(qgis_gui SYSTEM PRIVATE
${QT_QTUITOOLS_INCLUDE_DIR}
)

if (WITH_QT6)
if (BUILD_WITH_QT6)
target_include_directories(qgis_gui SYSTEM PRIVATE
${${QT_VERSION_BASE}Svg_INCLUDE_DIRS}
)
Expand Down Expand Up @@ -1624,7 +1624,7 @@ target_link_libraries(qgis_gui
${QT_VERSION_BASE}::QuickWidgets
)

if (WITH_QT6)
if (BUILD_WITH_QT6)
find_package(Qt6 COMPONENTS SvgWidgets REQUIRED)
target_link_libraries(qgis_gui
Qt6::SvgWidgets
Expand Down
2 changes: 1 addition & 1 deletion src/native/CMakeLists.txt
Expand Up @@ -134,7 +134,7 @@ if(NOT ANDROID)
)
endif()

if (WITH_QT6)
if (BUILD_WITH_QT6)
target_link_libraries(qgis_native ${Qt6Core_LIBRARIES} ${Qt6Gui_LIBRARIES} "${NATIVE_LINK_LIBS}")
else()
target_link_libraries(qgis_native ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} "${NATIVE_LINK_LIBS}")
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/geometry_checker/CMakeLists.txt
Expand Up @@ -30,7 +30,7 @@ set (geometrychecker_RCCS
########################################################
# Build

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI (geometrychecker_UIS_H ${geometrychecker_UIS})
else()
QT5_WRAP_UI (geometrychecker_UIS_H ${geometrychecker_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/CMakeLists.txt
Expand Up @@ -170,7 +170,7 @@ macro(ADD_GRASSPLUGIN GRASS_BUILD_VERSION)
set(GRASS_MAJOR_VERSION ${GRASS_MAJOR_VERSION${GRASS_BUILD_VERSION}})
set(GRASS_MINOR_VERSION ${GRASS_MINOR_VERSION${GRASS_BUILD_VERSION}})

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI (GRASS_PLUGIN_UIS_H ${GRASS_PLUGIN_UIS})
QT6_WRAP_CPP (GRASS_PLUGIN_MOC_SRCS ${GRASS_PLUGIN_MOC_HDRS})
else()
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/offline_editing/CMakeLists.txt
Expand Up @@ -18,7 +18,7 @@ set (offline_editing_plugin_RCCS offline_editing_plugin.qrc)
########################################################
# Build

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(offline_editing_plugin_UIS_H ${offline_editing_plugin_UIS})
else()
QT5_WRAP_UI(offline_editing_plugin_UIS_H ${offline_editing_plugin_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/topology/CMakeLists.txt
Expand Up @@ -21,7 +21,7 @@ set (topol_RCCS topol.qrc)
########################################################
# Build

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI (topol_UIS_H ${topol_UIS})
else()
QT5_WRAP_UI (topol_UIS_H ${topol_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/providers/arcgisrest/CMakeLists.txt
Expand Up @@ -37,7 +37,7 @@ target_link_libraries (provider_arcgisfeatureserver_a
)

if (WITH_GUI)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AFS_UIS_H ${AFS_UIS})
else()
QT5_WRAP_UI(AFS_UIS_H ${AFS_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/providers/delimitedtext/CMakeLists.txt
Expand Up @@ -30,7 +30,7 @@ target_compile_features(provider_delimitedtext_a PRIVATE cxx_std_17)
target_compile_definitions(provider_delimitedtext_a PRIVATE "-DQT_NO_FOREACH")

if (WITH_GUI)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(DTEXT_UIS_H ${DTEXT_UIS})
else()
QT5_WRAP_UI(DTEXT_UIS_H ${DTEXT_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/providers/grass/CMakeLists.txt
Expand Up @@ -62,7 +62,7 @@ macro(ADD_GRASSLIB GRASS_BUILD_VERSION)
)
endif()

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI (GRASS_LIBRARY_UIS_H
../qgsgrassoptionsbase.ui
)
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/CMakeLists.txt
Expand Up @@ -57,7 +57,7 @@ target_link_libraries (provider_postgres_a
)

if (WITH_GUI)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(PG_UIS_H ${PG_UIS})
else()
QT5_WRAP_UI(PG_UIS_H ${PG_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/providers/spatialite/CMakeLists.txt
Expand Up @@ -47,7 +47,7 @@ target_compile_features(provider_spatialite_a PRIVATE cxx_std_17)
target_compile_definitions(provider_spatialite_a PRIVATE "-DQT_NO_FOREACH")

if (WITH_GUI)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(SPATIALITE_UIS_H ${SPATIALITE_UIS})
else()
QT5_WRAP_UI(SPATIALITE_UIS_H ${SPATIALITE_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/providers/virtual/CMakeLists.txt
Expand Up @@ -50,7 +50,7 @@ target_compile_features(provider_virtuallayer_a PRIVATE cxx_std_17)
target_compile_definitions(provider_virtuallayer_a PRIVATE "-DQT_NO_FOREACH")

if (WITH_GUI)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(VLAYER_PROVIDER_UIS_H qgsvirtuallayersourceselectbase.ui qgsembeddedlayerselect.ui)
else()
QT5_WRAP_UI(VLAYER_PROVIDER_UIS_H qgsvirtuallayersourceselectbase.ui qgsembeddedlayerselect.ui)
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wfs/CMakeLists.txt
Expand Up @@ -60,7 +60,7 @@ target_compile_features(provider_wfs_a PRIVATE cxx_std_17)
target_compile_definitions(provider_wfs_a PRIVATE "-DQT_NO_FOREACH")

if (WITH_GUI)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(WFS_UIS_H ${WFS_UIS})
else()
QT5_WRAP_UI(WFS_UIS_H ${WFS_UIS})
Expand Down
2 changes: 1 addition & 1 deletion src/providers/wms/CMakeLists.txt
Expand Up @@ -33,7 +33,7 @@ target_include_directories(provider_wms_a PUBLIC
target_compile_features(provider_wms_a PRIVATE cxx_std_17)

if (WITH_GUI)
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(WMS_UIS_H ${WMS_UIS})
else()
QT5_WRAP_UI(WMS_UIS_H ${WMS_UIS})
Expand Down
6 changes: 3 additions & 3 deletions src/quickgui/CMakeLists.txt
Expand Up @@ -34,7 +34,7 @@ include_directories(SYSTEM

############################################################
# qgis_quick shared library
if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_CPP(QGIS_QUICK_GUI_MOC_SRCS ${QGIS_QUICK_GUI_MOC_HDRS})
else()
QT5_WRAP_CPP(QGIS_QUICK_GUI_MOC_SRCS ${QGIS_QUICK_GUI_MOC_HDRS})
Expand All @@ -55,14 +55,14 @@ add_library(qgis_quick ${LIBRARY_TYPE}
# require c++17
target_compile_features(qgis_quick PRIVATE cxx_std_17)

if (WITH_QT6)
if (BUILD_WITH_QT6)
target_link_libraries(qgis_quick Qt6::Quick Qt6::Qml Qt6::Xml Qt6::Concurrent Qt6::Positioning qgis_core)
else()
target_link_libraries(qgis_quick Qt5::Quick Qt5::Qml Qt5::Xml Qt5::Concurrent Qt5::Positioning qgis_core)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Android")
if (WITH_QT6)
if (BUILD_WITH_QT6)
target_link_libraries(qgis_quick Qt6::AndroidExtras)
else()
target_link_libraries(qgis_quick Qt5::AndroidExtras)
Expand Down
2 changes: 1 addition & 1 deletion src/quickgui/plugin/CMakeLists.txt
Expand Up @@ -43,7 +43,7 @@ include_directories(SYSTEM
############################################################
# qgis_quick_plugin module (QML) library

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_CPP(QGIS_QUICK_PLUGIN_MOC_SRCS ${QGIS_QUICK_PLUGIN_MOC_HDRS})
else()
QT5_WRAP_CPP(QGIS_QUICK_PLUGIN_MOC_SRCS ${QGIS_QUICK_PLUGIN_MOC_HDRS})
Expand Down
2 changes: 1 addition & 1 deletion src/ui/CMakeLists.txt
Expand Up @@ -18,7 +18,7 @@ file(GLOB ATTRIBUTEFORMCONFIG_UIS "${CMAKE_CURRENT_SOURCE_DIR}/attributeformconf
file(GLOB GEOREFERENCER_UIS "${CMAKE_CURRENT_SOURCE_DIR}/georeferencer/*.ui")
file(GLOB ANNOTATION_UIS "${CMAKE_CURRENT_SOURCE_DIR}/annotations/*.ui")

if (WITH_QT6)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(QGIS_UIS_H
${QGIS_UIS}
${SYMBOLLAYER_UIS}
Expand Down

0 comments on commit 6e37485

Please sign in to comment.