Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup cmake #60028

Merged
merged 10 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ci/ogc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ cmake -GNinja \
-DWITH_3D=OFF \
-DWITH_STAGED_PLUGINS=OFF \
-DWITH_GRASS=OFF \
-DSUPPRESS_QT_WARNINGS=ON \
-DENABLE_MODELTEST=OFF \
-DENABLE_PGTEST=OFF \
-DENABLE_MSSQLTEST=OFF \
Expand Down
1 change: 0 additions & 1 deletion .docker/docker-qgis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ cmake \
-DWITH_GRASS7=${WITH_GRASS7} \
-DWITH_GRASS8=${WITH_GRASS8} \
-DWITH_GRASS_PLUGIN=${WITH_GRASS8} \
-DSUPPRESS_QT_WARNINGS=ON \
-DENABLE_TESTS=ON \
-DENABLE_MODELTEST=${WITH_QT5} \
-DENABLE_PGTEST=${WITH_QT5} \
Expand Down
1 change: 0 additions & 1 deletion .docker/qgis.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ RUN SUCCESS=OK \
-DBINDINGS_GLOBAL_INSTALL=ON \
-DWITH_STAGED_PLUGINS=ON \
-DWITH_GRASS=ON \
-DSUPPRESS_QT_WARNINGS=ON \
-DDISABLE_DEPRECATED=ON \
-DENABLE_TESTS=OFF \
-DWITH_QSPATIALITE=ON \
Expand Down
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -675,13 +675,6 @@ if(WITH_CORE)
find_package(Libtasn1 REQUIRED)
endif()

if (SUPPRESS_QT_WARNINGS)
# Newer versions of UseQt4.cmake include Qt with -isystem automatically
# This can be used to force this behavior on older systems
# Can be removed as soon as Travis-CI updates from precise
include_directories(SYSTEM ${QT_INCLUDE_DIR})
endif()

# Disable automatic conversion from QString to ASCII 8-bit strings (char *)
# (Keeps code compatible with Qt/Mac/64bit)
add_definitions(-DQT_NO_CAST_TO_ASCII)
Expand Down
4 changes: 2 additions & 2 deletions python/PyQt6/core/core_auto.sip
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@
%Include auto_generated/gps/qgsgpsinformation.sip
%Include auto_generated/gps/qgsgpslogger.sip
%Include auto_generated/gps/qgsnmeaconnection.sip
%Include auto_generated/gps/qgsqtlocationconnection.sip
%Include auto_generated/gps/qgsgpsconnectionregistry.sip
%Include auto_generated/gps/qgssatelliteinformation.sip
%Include auto_generated/gps/qgsvectorlayergpslogger.sip
%Include auto_generated/labeling/qgscalloutposition.sip
Expand Down Expand Up @@ -805,8 +807,6 @@
%Include auto_generated/vectortile/qgsvectortileutils.sip
%Include auto_generated/vectortile/qgsvectortilewriter.sip
%Include auto_generated/vectortile/qgsvtpktiles.sip
%Include auto_generated/gps/qgsqtlocationconnection.sip
%If ( HAVE_WEBENGINE_SIP )
%Include auto_generated/web/qgswebenginepage.sip
%End
%Include auto_generated/gps/qgsgpsconnectionregistry.sip
2 changes: 1 addition & 1 deletion python/PyQt6/gui/gui_auto.sip
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
%Include auto_generated/editorwidgets/qgsjsoneditwidget.sip
%End
%Include auto_generated/editorwidgets/qgsmultiedittoolbutton.sip
%Include auto_generated/editorwidgets/qgsqmlwidgetwrapper.sip
%Include auto_generated/editorwidgets/qgsrelationaggregatesearchwidgetwrapper.sip
%Include auto_generated/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip
%Include auto_generated/editorwidgets/qgsrelationreferencewidget.sip
Expand Down Expand Up @@ -534,4 +535,3 @@
%Include auto_generated/tiledscene/qgstiledscenerendererpropertieswidget.sip
%Include auto_generated/tiledscene/qgstiledscenerendererwidget.sip
%Include auto_generated/vectortile/qgsvectortilelayerproperties.sip
%Include auto_generated/editorwidgets/qgsqmlwidgetwrapper.sip
4 changes: 2 additions & 2 deletions python/core/core_auto.sip
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@
%Include auto_generated/gps/qgsgpsinformation.sip
%Include auto_generated/gps/qgsgpslogger.sip
%Include auto_generated/gps/qgsnmeaconnection.sip
%Include auto_generated/gps/qgsqtlocationconnection.sip
%Include auto_generated/gps/qgsgpsconnectionregistry.sip
%Include auto_generated/gps/qgssatelliteinformation.sip
%Include auto_generated/gps/qgsvectorlayergpslogger.sip
%Include auto_generated/labeling/qgscalloutposition.sip
Expand Down Expand Up @@ -805,8 +807,6 @@
%Include auto_generated/vectortile/qgsvectortileutils.sip
%Include auto_generated/vectortile/qgsvectortilewriter.sip
%Include auto_generated/vectortile/qgsvtpktiles.sip
%Include auto_generated/gps/qgsqtlocationconnection.sip
%If ( HAVE_WEBENGINE_SIP )
%Include auto_generated/web/qgswebenginepage.sip
%End
%Include auto_generated/gps/qgsgpsconnectionregistry.sip
2 changes: 1 addition & 1 deletion python/gui/gui_auto.sip
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
%Include auto_generated/editorwidgets/qgsjsoneditwidget.sip
%End
%Include auto_generated/editorwidgets/qgsmultiedittoolbutton.sip
%Include auto_generated/editorwidgets/qgsqmlwidgetwrapper.sip
%Include auto_generated/editorwidgets/qgsrelationaggregatesearchwidgetwrapper.sip
%Include auto_generated/editorwidgets/qgsrelationreferencesearchwidgetwrapper.sip
%Include auto_generated/editorwidgets/qgsrelationreferencewidget.sip
Expand Down Expand Up @@ -534,4 +535,3 @@
%Include auto_generated/tiledscene/qgstiledscenerendererpropertieswidget.sip
%Include auto_generated/tiledscene/qgstiledscenerendererwidget.sip
%Include auto_generated/vectortile/qgsvectortilelayerproperties.sip
%Include auto_generated/editorwidgets/qgsqmlwidgetwrapper.sip
12 changes: 7 additions & 5 deletions src/3d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,13 @@ target_include_directories(qgis_3d PUBLIC
${CMAKE_SOURCE_DIR}/external/tinygltf
)

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)
endif()
target_link_libraries(qgis_3d
${QT_VERSION_BASE}::3DCore
${QT_VERSION_BASE}::3DRender
${QT_VERSION_BASE}::3DInput
${QT_VERSION_BASE}::3DLogic
${QT_VERSION_BASE}::3DExtras
)

GENERATE_EXPORT_HEADER(
qgis_3d
Expand Down
18 changes: 3 additions & 15 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,6 @@ else()
set(QWTPOLAR_INCLUDE_DIR "")
endif()

if (POSTGRES_FOUND)
if(HAVE_PGCONFIG)
add_definitions(-DHAVE_PGCONFIG=1)
endif()
endif()

# Test data dir for QgsAppScreenShots
add_definitions(-DTEST_DATA_DIR="${TEST_DATA_DIR}")

Expand Down Expand Up @@ -513,10 +507,6 @@ if (APPLE)
include_directories(${CMAKE_SOURCE_DIR}/src/native/mac)
endif()

if (POSTGRES_FOUND)
include_directories(SYSTEM ${POSTGRES_INCLUDE_DIR})
endif()

#############
if (ANDROID)
add_library(${QGIS_APP_NAME} ${LIBRARY_TYPE} ${QGIS_APPMAIN_SRCS})
Expand Down Expand Up @@ -549,6 +539,9 @@ add_library(qgis_app ${LIBRARY_TYPE} ${QGIS_APP_SRCS})
target_compile_features(qgis_app PRIVATE cxx_std_17)

target_compile_definitions(qgis_app PRIVATE "QT_PLUGINS_DIR=\"${QT_PLUGINS_DIR}\"")
if (POSTGRES_FOUND)
target_compile_definitions(qgis_app PRIVATE -DPOSTGRESQL_VERSION=${PostgreSQL_VERSION_STRING})
endif()

target_include_directories(qgis_app PUBLIC
${CMAKE_SOURCE_DIR}/external/nmea
Expand Down Expand Up @@ -586,7 +579,6 @@ if (WITH_3D)
endif()

target_include_directories(qgis_app SYSTEM PUBLIC
${QT_QTUITOOLS_INCLUDE_DIR}
${QWTPOLAR_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/external/qt-unix-signals
)
Expand Down Expand Up @@ -693,10 +685,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(${QGIS_APP_NAME} ${EXECINFO_LIBRARY})
endif()

if (POSTGRES_FOUND)
target_link_libraries (qgis_app ${POSTGRES_LIBRARY})
endif()

if (WITH_PDAL)
target_link_libraries(qgis_app ${PDAL_LIBRARIES})
endif()
Expand Down
6 changes: 1 addition & 5 deletions src/auth/apiheader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthapiheaderedit.h
)
set(AUTH_APIHEADER_UIS gui/qgsauthapiheaderedit.ui)
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})
endif()
qt_wrap_ui(AUTH_APIHEADER_UIS_H ${AUTH_APIHEADER_UIS})
endif()


Expand Down
6 changes: 1 addition & 5 deletions src/auth/awss3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthawss3edit.h
)
set(AUTH_AWSS3_UIS gui/qgsauthawss3edit.ui)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_AWSS3_UIS_H ${AUTH_AWSS3_UIS})
else()
QT5_WRAP_UI(AUTH_AWSS3_UIS_H ${AUTH_AWSS3_UIS})
endif()
qt_wrap_ui(AUTH_AWSS3_UIS_H ${AUTH_AWSS3_UIS})
endif()


Expand Down
6 changes: 1 addition & 5 deletions src/auth/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthbasicedit.h
)
set(AUTH_BASIC_UIS gui/qgsauthbasicedit.ui)
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})
endif()
qt_wrap_ui(AUTH_BASIC_UIS_H ${AUTH_BASIC_UIS})
endif()


Expand Down
6 changes: 1 addition & 5 deletions src/auth/esritoken/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthesritokenedit.h
)
set(AUTH_ESRITOKEN_UIS gui/qgsauthesritokenedit.ui)
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})
endif()
qt_wrap_ui(AUTH_ESRITOKEN_UIS_H ${AUTH_ESRITOKEN_UIS})
endif()


Expand Down
6 changes: 1 addition & 5 deletions src/auth/identcert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthidentcertedit.h
)
set(AUTH_IDENTCERT_UIS gui/qgsauthidentcertedit.ui)
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})
endif()
qt_wrap_ui(AUTH_IDENTCERT_UIS_H ${AUTH_IDENTCERT_UIS})
endif()


Expand Down
6 changes: 1 addition & 5 deletions src/auth/maptiler_hmacsha256/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthmaptilerhmacsha256edit.h
)
set(AUTH_MAPTILER_HMACSHA256_UIS gui/qgsauthmaptilerhmacsha256edit.ui)
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})
endif()
qt_wrap_ui(AUTH_MAPTILER_HMACSHA256_UIS_H ${AUTH_MAPTILER_HMACSHA256_UIS})
endif()


Expand Down
6 changes: 1 addition & 5 deletions src/auth/oauth2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ if (WITH_GUI)
)

set(AUTH_OAUTH2_UIS gui/qgsauthoauth2edit.ui)
if (BUILD_WITH_QT6)
QT6_WRAP_UI(AUTH_OAUTH2_UIS_H ${AUTH_OAUTH2_UIS})
else()
QT5_WRAP_UI(AUTH_OAUTH2_UIS_H ${AUTH_OAUTH2_UIS})
endif()
qt_wrap_ui(AUTH_OAUTH2_UIS_H ${AUTH_OAUTH2_UIS})

endif()

Expand Down
6 changes: 1 addition & 5 deletions src/auth/pkipaths/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthpkipathsedit.h
)
set(AUTH_PKIPATHS_UIS gui/qgsauthpkipathsedit.ui)
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})
endif()
qt_wrap_ui(AUTH_PKIPATHS_UIS_H ${AUTH_PKIPATHS_UIS})
endif()

# static library
Expand Down
6 changes: 1 addition & 5 deletions src/auth/pkipkcs12/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ if (WITH_GUI)
gui/qgsauthpkcs12edit.h
)
set(AUTH_PKCS12_UIS gui/qgsauthpkcs12edit.ui)
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})
endif()
qt_wrap_ui(AUTH_PKCS12_UIS_H ${AUTH_PKCS12_UIS})
endif()

# static library
Expand Down
Loading
Loading