source: calamares/trunk/fuentes/src/modules/webview/CMakeLists.txt @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 13 months ago

sync with github

File size: 1.6 KB
Line 
1list( APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES
2    ${PROJECT_BINARY_DIR}/src/libcalamaresui
3)
4list( APPEND CALA_WEBVIEW_LINK_LIBRARIES
5    calamaresui
6)
7
8option( WEBVIEW_FORCE_WEBKIT "Always build webview with WebKit instead of WebEngine regardless of Qt version." OFF)
9
10message( STATUS "Found Qt version ${Qt5Core_VERSION}")
11if ( Qt5Core_VERSION VERSION_LESS 5.6 OR WEBVIEW_FORCE_WEBKIT )
12    message( STATUS " .. using webkit")
13    find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED WebKit WebKitWidgets )
14
15    list( APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES
16        ${QT_QTWEBKIT_INCLUDE_DIR}
17    )
18    list( APPEND CALA_WEBVIEW_LINK_LIBRARIES
19        Qt5::WebKit
20        Qt5::WebKitWidgets
21    )
22    set( WEBVIEW_WITH_WEBKIT 1 )
23else()
24    message( STATUS " .. using webengine")
25    find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED WebEngine WebEngineWidgets )
26
27    list( APPEND CALA_WEBVIEW_INCLUDE_DIRECTORIES
28        ${QT_QTWEBENGINE_INCLUDE_DIR}
29    )
30    list( APPEND CALA_WEBVIEW_LINK_LIBRARIES
31        Qt5::WebEngine
32        Qt5::WebEngineWidgets
33    )
34    set( WEBVIEW_WITH_WEBENGINE 1 )
35endif()
36
37include_directories( ${CALA_WEBVIEW_INCLUDE_DIRECTORIES} )
38
39set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
40                       ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules )
41
42configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/WebViewConfig.h.in
43                ${CMAKE_CURRENT_BINARY_DIR}/WebViewConfig.h )
44
45calamares_add_plugin( webview
46    TYPE viewmodule
47    EXPORT_MACRO PLUGINDLLEXPORT_PRO
48    SOURCES
49        WebViewStep.cpp
50    LINK_PRIVATE_LIBRARIES
51        ${CALA_WEBVIEW_LINK_LIBRARIES}
52    SHARED_LIB
53)
Note: See TracBrowser for help on using the repository browser.