Add switch to select between Qt4 and Qt5
This commit is contained in:
@@ -8,10 +8,20 @@ include_directories(
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(Web_LIBS
|
||||
FreeCADApp
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
if(BUILD_QT5)
|
||||
include_directories(
|
||||
${Qt5Network_INCLUDE_DIRS}
|
||||
)
|
||||
set(Web_LIBS
|
||||
FreeCADApp
|
||||
${Qt5Network_LIBRARIES}
|
||||
)
|
||||
else()
|
||||
set(Web_LIBS
|
||||
FreeCADApp
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(Web_MOC_HDRS
|
||||
Server.h
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
add_subdirectory(App)
|
||||
if(BUILD_GUI)
|
||||
add_subdirectory(Gui)
|
||||
if(Qt5WebEngine_FOUND OR QT_QTWEBKIT_FOUND)
|
||||
add_subdirectory(Gui)
|
||||
endif()
|
||||
endif(BUILD_GUI)
|
||||
|
||||
INSTALL(
|
||||
|
||||
@@ -11,7 +11,17 @@ set(WebGui_LIBS
|
||||
FreeCADGui
|
||||
)
|
||||
|
||||
qt4_add_resources(Web_QRC_SRCS Resources/Web.qrc)
|
||||
if(BUILD_QT5)
|
||||
include_directories(
|
||||
${Qt5WebEngine_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND WebGui_LIBS
|
||||
${Qt5WebEngine_LIBRARIES}
|
||||
)
|
||||
qt5_add_resources(Web_QRC_SRCS Resources/Web.qrc)
|
||||
else()
|
||||
qt4_add_resources(Web_QRC_SRCS Resources/Web.qrc)
|
||||
endif()
|
||||
|
||||
SET(WebGui_SRCS
|
||||
${Web_QRC_SRCS}
|
||||
|
||||
Reference in New Issue
Block a user