cMake: Add support for compiling against Qt6 (#7647)

Removes the BUILD_QT5 flag and adds a new FREECAD_QT_VERSION option,
which can be set to either "Auto" (default), 5, or 6. Auto detects which
version of Qt is installed on the system and chooses it. If both version
are installed, Qt5 is used.

Note that this DOES NOT implement compiling against Qt6, it only adds
the necessary cMake infrastructure to begin work on the source code
changes that will be required.
This commit is contained in:
Chris Hennes
2022-10-31 09:24:09 -05:00
committed by GitHub
parent 7c6684a821
commit 2f7be9e782
37 changed files with 595 additions and 662 deletions

View File

@@ -35,13 +35,7 @@ set(ImageGui_UIC_SRCS
ImageOrientationDialog.ui
)
if(BUILD_QT5)
qt5_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
qt5_wrap_ui(ImageGui_UIC_HDRS ${ImageGui_UIC_SRCS})
else()
qt4_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
qt4_wrap_ui(ImageGui_UIC_HDRS ${ImageGui_UIC_SRCS})
endif()
qt_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
SET(ImageGui_SRCS
${ImageGui_QRC_SRCS}