1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-27 15:26:33 -04:00

CMake: Require all needed Qt modules to fail early when not found.

This commit is contained in:
Kacper Michajłow 2021-01-31 15:10:20 +01:00
parent 9864c26f11
commit 3388e385b6

View File

@ -293,23 +293,26 @@ set(CMAKE_AUTORCC TRUE)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Qt requirements # Qt requirements
set(_required_qt_version "5.6.0") find_package(Qt5
find_package(Qt5 COMPONENTS Core REQUIRED) REQUIRED COMPONENTS
find_package(Qt5 COMPONENTS Widgets REQUIRED) Core
find_package(Qt5 COMPONENTS WebSockets REQUIRED) Widgets
find_package(Qt5 COMPONENTS Multimedia REQUIRED) WebSockets
find_package(Qt5 COMPONENTS MultimediaWidgets REQUIRED) Multimedia
find_package(Qt5 COMPONENTS SerialPort) MultimediaWidgets
SerialPort)
# for the server we don't need OpenGL/Qt Quick components # for the server we don't need OpenGL/Qt Quick components
if (BUILD_GUI) if (BUILD_GUI)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
find_package(Qt5 COMPONENTS OpenGL REQUIRED) find_package(Qt5
find_package(Qt5 COMPONENTS Quick) REQUIRED COMPONENTS
find_package(Qt5 COMPONENTS QuickWidgets) OpenGL
find_package(Qt5 COMPONENTS Positioning) Quick
find_package(Qt5 COMPONENTS Location) QuickWidgets
find_package(Qt5 COMPONENTS Charts) Positioning
Location
Charts)
endif() endif()
# other requirements # other requirements