use a combo box to choose between Qt's webkit and WebEngine modules
This commit is contained in:
@@ -228,8 +228,12 @@ if (BUILD_QT5)
|
||||
if (FREECAD_USE_QTOPENGL_WIDGET)
|
||||
set(HAVE_QT5_OPENGL 1)
|
||||
endif()
|
||||
OPTION(FREECAD_USE_QWEBKIT "Force use QWebKit instead of QWebEngine." OFF)
|
||||
OPTION(FREECAD_USE_QWEBKENGINE "Force use QWebEngine instead of QWebKit." OFF)
|
||||
set(FREECAD_USE_QTWEBMODULE "Automatic" CACHE STRING "Qt Webkit or Qt WebEngine")
|
||||
set_property(CACHE FREECAD_USE_QTWEBMODULE PROPERTY STRINGS
|
||||
"Automatic"
|
||||
"Qt Webkit"
|
||||
"Qt WebEngine"
|
||||
)
|
||||
endif()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/src/QtOpenGL.h.cmake ${CMAKE_BINARY_DIR}/src/QtOpenGL.h)
|
||||
|
||||
@@ -892,19 +896,19 @@ endif()
|
||||
find_package(Qt5UiTools REQUIRED)
|
||||
find_package(Qt5Concurrent REQUIRED)
|
||||
if (BUILD_WEB)
|
||||
if (FREECAD_USE_QWEBKIT)
|
||||
if (${FREECAD_USE_QTWEBMODULE} MATCHES "Qt Webkit")
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
elseif(FREECAD_USE_QWEBENGINE)
|
||||
elseif(${FREECAD_USE_QTWEBMODULE} MATCHES "Qt WebEngine")
|
||||
find_package(Qt5WebEngineWidgets REQUIRED)
|
||||
if (Qt5WebEngineWidgets_VERSION VERSION_LESS 5.7.0)
|
||||
message(FATAL_ERROR "** Minimum supported Qt5WebEngine version is 5.70!\n")
|
||||
message(FATAL_ERROR "** Minimum supported Qt5WebEngine version is 5.7.0!\n")
|
||||
endif()
|
||||
else()
|
||||
find_package(Qt5WebKitWidgets REQUIRED)
|
||||
else() # Automatic
|
||||
find_package(Qt5WebKitWidgets QUIET)
|
||||
if(NOT Qt5WebKitWidgets_FOUND)
|
||||
find_package(Qt5WebEngineWidgets REQUIRED)
|
||||
if (Qt5WebEngineWidgets_VERSION VERSION_LESS 5.7.0)
|
||||
message(FATAL_ERROR "** Minimum supported Qt5WebEngine version is 5.70!\n")
|
||||
message(FATAL_ERROR "** Minimum supported Qt5WebEngine version is 5.7.0!\n")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user