cmake: use less hardcoded items
This commit is contained in:
@@ -30,6 +30,7 @@ set(QT_PACKAGELIST
|
||||
set(Qt5_FOUND ON)
|
||||
foreach(_qt_package IN LISTS QT_PACKAGELIST)
|
||||
find_package(${_qt_package} QUIET ${QT_FIND_PACKAGE_OPTIONS})
|
||||
set(Qt5_LIBRARIES ${${_qt_package}_LIBRARIES} ${Qt5_LIBRARIES})
|
||||
if(NOT ${_qt_package}_FOUND)
|
||||
set(Qt5_FOUND OFF)
|
||||
endif(NOT ${_qt_package}_FOUND)
|
||||
@@ -213,7 +214,7 @@ if (Qt5_FOUND)
|
||||
${TARGET_SOURCES})
|
||||
|
||||
add_definitions("-DHAVE_GUI")
|
||||
set(ADDITIONAL_LNK Qt5::Core Qt5::Widgets Qt5::Gui ${ADDITIONAL_LNK})
|
||||
set(ADDITIONAL_LNK ${Qt5_LIBRARIES} ${ADDITIONAL_LNK})
|
||||
else (Qt5_FOUND)
|
||||
message("Qt5 library not found, not building gui")
|
||||
set(TARGET_SOURCES
|
||||
@@ -224,7 +225,7 @@ endif (Qt5_FOUND)
|
||||
if (BLUEZ_FOUND)
|
||||
message("Bluez library found, building native Bluetooth support :)")
|
||||
add_definitions("-DHAVE_BLUEZ")
|
||||
set(ADDITIONAL_LNK bluetooth ${ADDITIONAL_LNK})
|
||||
set(ADDITIONAL_LNK ${BLUEZ_LIBRARIES} ${ADDITIONAL_LNK})
|
||||
endif (BLUEZ_FOUND)
|
||||
|
||||
if (PYTHON3EMBED_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user