diff options
author | Alexander V. Wolf <alex.v.wolf@gmail.com> | 2022-03-15 15:07:51 +0700 |
---|---|---|
committer | Alexander V. Wolf <alex.v.wolf@gmail.com> | 2022-03-15 15:07:51 +0700 |
commit | e507fc29d57cec5d8d0de84e7c340d747906698c (patch) | |
tree | 8f3fefa0377f0791cc193a378d64e690ec0d57b8 | |
parent | 43c76f60e20a918483801f56bc7d38ddad0909d6 (diff) |
[cmake] added extra flag to disable QtWebEngine module support
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | plugins/OnlineQueries/src/CMakeLists.txt | 22 |
2 files changed, 15 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a4e2524c5..53d8187f43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -331,6 +331,9 @@ ENDIF() # Activate media support SET(ENABLE_MEDIA 1 CACHE BOOL "Define whether media support should be activated.") +# Activate QtWebEngine support +SET(ENABLE_QTWEBENGINE 1 CACHE BOOL "Define whether QtWebEngine module should be supported if it installed.") + # Activate GPS support. Solution depends on operating system: # - Windows: Only directly-attached serial NMEA emitter. # - Other systems: libgps if possible and NMEA emitter as fallback. diff --git a/plugins/OnlineQueries/src/CMakeLists.txt b/plugins/OnlineQueries/src/CMakeLists.txt index 94a41236ab..aedc15c0ee 100644 --- a/plugins/OnlineQueries/src/CMakeLists.txt +++ b/plugins/OnlineQueries/src/CMakeLists.txt @@ -25,16 +25,18 @@ SET(ONLINEQUERIES_UIS QT5_WRAP_UI(ONLINEQUERIES_UIS_H ${ONLINEQUERIES_UIS}) -FIND_PACKAGE(Qt5WebEngine QUIET) -FIND_PACKAGE(Qt5WebEngineWidgets QUIET) -IF(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) - ADD_DEFINITIONS(-DWITH_QTWEBENGINE) - SET(QTWEBENGINE_LIBS Qt5::WebEngine Qt5::WebEngineWidgets) -ELSE(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) - MESSAGE(WARNING "Qt5WebEngine and/or Qt5WebEngineWidgets not found. \ - If these packages exist for your platform, install and rerun. \ - Else the program will call the system web browser where required.") -ENDIF(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) +IF(ENABLE_QTWEBENGINE) + FIND_PACKAGE(Qt5WebEngine QUIET) + FIND_PACKAGE(Qt5WebEngineWidgets QUIET) + IF(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) + ADD_DEFINITIONS(-DWITH_QTWEBENGINE) + SET(QTWEBENGINE_LIBS Qt5::WebEngine Qt5::WebEngineWidgets) + ELSE(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) + MESSAGE(WARNING "Qt5WebEngine and/or Qt5WebEngineWidgets not found. \ + If these packages exist for your platform, install and rerun. \ + Else the program will call the system web browser where required.") + ENDIF(Qt5WebEngine_FOUND AND Qt5WebEngineWidgets_FOUND) +ENDIF(ENABLE_QTWEBENGINE) ################# compiles resources files ############ SET(ONLINEQUERIES_RES ../resources/OnlineQueries.qrc) |