forked from len0rd/rockbox
rbutil: Make QtMultimedia an optional component.
We only use it for playing the TTS sample so it's not too important. Since this is a separate Qt module it might not be installed, so make it optional. Change-Id: I2c91dd5d587c8a984525b2297bbe7d597b816b4f
This commit is contained in:
parent
8a6ceff376
commit
6ef094c1a9
2 changed files with 9 additions and 3 deletions
|
@ -52,8 +52,8 @@ if(QT_VERSION_MAJOR EQUAL 5)
|
|||
Core Widgets Svg Multimedia Network Test LinguistTools)
|
||||
else()
|
||||
find_package(Qt6 REQUIRED COMPONENTS
|
||||
Core Core5Compat Widgets Svg Multimedia Network LinguistTools SvgWidgets
|
||||
OPTIONAL_COMPONENTS Test)
|
||||
Core Core5Compat Widgets Svg Network LinguistTools SvgWidgets
|
||||
OPTIONAL_COMPONENTS Multimedia Test)
|
||||
endif()
|
||||
get_target_property(_moc_executable Qt${QT_VERSION_MAJOR}::moc IMPORTED_LOCATION)
|
||||
get_filename_component(QT_BINDIR "${_moc_executable}" DIRECTORY)
|
||||
|
|
|
@ -125,8 +125,14 @@ if(APPLE)
|
|||
endif()
|
||||
|
||||
target_link_libraries(RockboxUtility rbbase cutelogger gitversion
|
||||
Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Svg)
|
||||
|
||||
if (TARGET Qt${QT_VERSION_MAJOR}::Multimedia) # optional
|
||||
target_link_libraries(RockboxUtility
|
||||
Qt${QT_VERSION_MAJOR}::Multimedia)
|
||||
endif()
|
||||
|
||||
if(QT_VERSION_MAJOR EQUAL 6)
|
||||
target_link_libraries(RockboxUtility Qt${QT_VERSION_MAJOR}::SvgWidgets)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue