mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Disable QtWebEngine automatic if not found
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
parent
991f79c123
commit
40065dc6dc
4 changed files with 6 additions and 10 deletions
|
@ -9,10 +9,6 @@ set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
||||||
include(${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake)
|
include(${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake)
|
||||||
|
|
||||||
if(WITH_WEBENGINE)
|
|
||||||
add_compile_definitions(WITH_WEBENGINE=1)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Default suffix if the theme doesn't define one
|
# Default suffix if the theme doesn't define one
|
||||||
if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX)
|
if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX)
|
||||||
set(APPLICATION_VIRTUALFILE_SUFFIX "${APPLICATION_SHORTNAME}_virtual" CACHE STRING "Virtual file suffix (not including the .)")
|
set(APPLICATION_VIRTUALFILE_SUFFIX "${APPLICATION_SHORTNAME}_virtual" CACHE STRING "Virtual file suffix (not including the .)")
|
||||||
|
|
|
@ -27,8 +27,6 @@ option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
||||||
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE STRING "URL for crash reporter" )
|
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE STRING "URL for crash reporter" )
|
||||||
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
||||||
|
|
||||||
option(WITH_WEBENGINE "Enable use of QWebEngine" ON)
|
|
||||||
|
|
||||||
## Updater options
|
## Updater options
|
||||||
option( BUILD_UPDATER "Build updater" OFF )
|
option( BUILD_UPDATER "Build updater" OFF )
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,10 @@ include(ECMEnableSanitizers)
|
||||||
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
|
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
|
||||||
|
|
||||||
find_package(Qt5 5.12 COMPONENTS Core Network Xml Concurrent REQUIRED)
|
find_package(Qt5 5.12 COMPONENTS Core Network Xml Concurrent REQUIRED)
|
||||||
if(WITH_WEBENGINE)
|
find_package(Qt5 5.12 COMPONENTS WebEngineWidgets WebEngine)
|
||||||
find_package(Qt5 5.12 COMPONENTS WebEngineWidgets WebEngine REQUIRED)
|
|
||||||
|
if(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND)
|
||||||
|
add_compile_definitions(WITH_WEBENGINE=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||||
|
|
|
@ -134,7 +134,7 @@ set(client_SRCS
|
||||||
wizard/linklabel.cpp
|
wizard/linklabel.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (WITH_WEBENGINE)
|
if (Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND)
|
||||||
list(APPEND client_SRCS
|
list(APPEND client_SRCS
|
||||||
wizard/webviewpage.cpp
|
wizard/webviewpage.cpp
|
||||||
wizard/webview.cpp
|
wizard/webview.cpp
|
||||||
|
@ -337,7 +337,7 @@ target_link_libraries(nextcloudCore
|
||||||
${synclib_NAME}
|
${synclib_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WITH_WEBENGINE)
|
if(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND)
|
||||||
target_link_libraries(nextcloudCore PUBLIC Qt5::WebEngineWidgets)
|
target_link_libraries(nextcloudCore PUBLIC Qt5::WebEngineWidgets)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue