diff options
author | Alexander Batischev <eual.jp@gmail.com> | 2021-11-08 15:31:50 +0300 |
---|---|---|
committer | Alexander Batischev <eual.jp@gmail.com> | 2021-11-15 13:57:18 +0300 |
commit | d8560dcb1965a2ffa1b3a5fee14d57d62bf3a4f9 (patch) | |
tree | 2cfe83b34e440b7fa7ca39b29edc2e43aefc8a7c /src/gui/CMakeLists.txt | |
parent | 0e5f1d9a3045c6394fdd4fab63bb3b9b2911ad37 (diff) |
CMake: fail if `Qt5::GuiPrivate` is not found
`nextcloud` and `nextcloudCore` depend on three Qt5 components which
aren't mentioned in `find_library`: `Xml`, `Network`, and `GuiPrivate`.
The first two are omitted by mistake, apparently, so this commit just
adds them.
`GuiPrivate` is a special case: it doesn't have its own CMake config, so
adding it to "required components" in `find_package` will always fail
the build. Thus, we implement our own check instead.
Signed-off-by: Alexander Batischev <eual.jp@gmail.com>
Diffstat (limited to 'src/gui/CMakeLists.txt')
-rw-r--r-- | src/gui/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 3cbca8dbf..b41810cd3 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,5 +1,8 @@ project(gui) -find_package(Qt5 REQUIRED COMPONENTS Widgets Svg Qml Quick QuickControls2) +find_package(Qt5 REQUIRED COMPONENTS Widgets Svg Qml Quick QuickControls2 Xml Network) +if (NOT TARGET Qt5::GuiPrivate) + message(FATAL_ERROR "Could not find GuiPrivate component of Qt5. It might be shipped as a separate package, please check that.") +endif() if(CMAKE_BUILD_TYPE MATCHES Debug) add_definitions(-DQT_QML_DEBUG) |