Skip to content

Commit

Permalink
Allow the Qt version to be chosen explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
argilo committed Oct 9, 2023
1 parent e5e41e4 commit 5ac3eeb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,20 @@ else()
endif()

# 3rd Party Dependency Stuff
find_package(Qt6 QUIET COMPONENTS Core Network Widgets Svg SvgWidgets)
if(NOT Qt6_FOUND)
option(FORCE_QT6 "Force Qt6 to be used" OFF)
option(FORCE_QT5 "Force Qt5 to be used" OFF)

if(FORCE_QT6)
find_package(Qt6 QUIET COMPONENTS Core Network Widgets Svg SvgWidgets)
elseif(FORCE_QT5)
find_package(Qt5 REQUIRED COMPONENTS Core Network Widgets Svg)
else()
find_package(Qt6 QUIET COMPONENTS Core Network Widgets Svg SvgWidgets)
if(NOT Qt6_FOUND)
find_package(Qt5 REQUIRED COMPONENTS Core Network Widgets Svg)
endif()
endif()

include(FindPkgConfig)
find_package(Gnuradio-osmosdr REQUIRED)

Expand Down

0 comments on commit 5ac3eeb

Please sign in to comment.