mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-19 04:00:40 +01:00
Change CMakeLists.txt to use list APPEND for Qt5
This commit is contained in:
parent
b7c394b7a5
commit
c1939a36dd
@ -122,34 +122,37 @@ endif(WIN32)
|
||||
|
||||
# QT
|
||||
set(QT_MIN_VERSION 5.5)
|
||||
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Concurrent Widgets Network Sql)
|
||||
set(QT_COMPONENTS Core Concurrent Widgets Network Sql)
|
||||
|
||||
if(X11_FOUND)
|
||||
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras)
|
||||
list(APPEND QT_COMPONENTS X11Extras)
|
||||
endif()
|
||||
if(DBUS_FOUND)
|
||||
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS DBus)
|
||||
list(APPEND QT_COMPONENTS DBus)
|
||||
endif()
|
||||
if(APPLE)
|
||||
list(APPEND QT_COMPONENTS MacExtras)
|
||||
endif()
|
||||
if(WIN32)
|
||||
list(APPEND QT_COMPONENTS WinExtras)
|
||||
endif()
|
||||
|
||||
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED ${QT_COMPONENTS})
|
||||
|
||||
set(QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Concurrent_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES} ${Qt5Sql_LIBRARIES})
|
||||
|
||||
if(Qt5DBus_FOUND)
|
||||
list(APPEND QT_LIBRARIES ${Qt5DBus_LIBRARIES})
|
||||
get_target_property(QT_DBUSXML2CPP_EXECUTABLE Qt5::qdbusxml2cpp LOCATION)
|
||||
endif()
|
||||
if(APPLE)
|
||||
find_package(Qt5 REQUIRED COMPONENTS MacExtras)
|
||||
if(Qt5X11Extras_FOUND)
|
||||
list(APPEND QT_LIBRARIES ${Qt5X11Extras_LIBRARIES})
|
||||
endif()
|
||||
if(WIN32)
|
||||
find_package(Qt5 REQUIRED COMPONENTS WinExtras)
|
||||
if(Qt5MacExtras_FOUND)
|
||||
list(APPEND QT_LIBRARIES ${Qt5MacExtras_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Sql)
|
||||
|
||||
if(DBUS_FOUND)
|
||||
set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::DBus)
|
||||
endif()
|
||||
if(X11_FOUND)
|
||||
set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::X11Extras)
|
||||
endif()
|
||||
if(APPLE)
|
||||
set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::MacExtras)
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::WinExtras)
|
||||
if(Qt5WinExtras_FOUND)
|
||||
list(APPEND QT_LIBRARIES ${Qt5WinExtras_LIBRARIES})
|
||||
endif()
|
||||
|
||||
find_package(Qt5LinguistTools CONFIG)
|
||||
|
Loading…
Reference in New Issue
Block a user