Qt6: fix possible build failure

* add CMake definitions 'QT_NO_KEYWORDS' to avoid the Qt definition of the 'slots' macro that causes a conflict when including Python headers
* drop QT3_SUPPORT define
This commit is contained in:
wmayer
2023-07-10 22:27:20 +02:00
committed by Chris Hennes
parent 0fcdeded7a
commit 8c0fd2706a
7 changed files with 18 additions and 12 deletions

View File

@@ -38,6 +38,8 @@ set(CMAKE_AUTOMOC TRUE)
set(CMAKE_AUTOUIC TRUE)
set(QtCore_MOC_EXECUTABLE ${Qt${FREECAD_QT_MAJOR_VERSION}Core_MOC_EXECUTABLE})
add_definitions(-DQT_NO_KEYWORDS)
message(STATUS "Set up to compile with Qt ${Qt${FREECAD_QT_MAJOR_VERSION}Core_VERSION}")
# In Qt 5.15 they added more generic names for these functions: "backport" those new names