diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-11-20 11:49:56 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-16 08:00:31 -0800 |
commit | aaafaade5ec645df2b48a3ef8c6e984d95d04636 (patch) | |
tree | 4925e294b70d5e5d1c0977edc2580cef9945620f /CMakeLists.txt | |
parent | 24f0abe3472306ce76f8644273589cf98b1625cf (diff) | |
download | subsurface-aaafaade5ec645df2b48a3ef8c6e984d95d04636.tar.gz |
Use a single variable to handle the extra Qt stuff
It's easier to debug what's wrong this way
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 351bcb156..4eaacde80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,24 +111,23 @@ if(ANDROID) set(NO_PRINTING ON) endif() -set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES}) - # configure Qt. if(SUBSURFACE_MOBILE) - set(QT_QUICK_PKG Quick) - set(QT_QUICK_LIB Qt5::Quick) + list(APPEND QT_EXTRA_COMPONENTS Quick) + list(APPEND QT_EXTRA_LIBRARIES Qt5::Quick) add_definitions(-DSUBSURFACE_MOBILE) endif() if(ANDROID) - set(ANDROID_PKG AndroidExtras) - set(ANDROID_LIB Qt5::AndroidExtras) + list(APPEND QT_EXTRA_COMPONENTS AndroidExtras) + list(APPEND QT_EXTRA_LIBRARIES Qt5::AndroidExtras) endif() if(BTSUPPORT) - set(BLUETOOTH_PKG Bluetooth) - set(BLUETOOTH_LIB Qt5::Bluetooth) + list(APPEND QT_EXTRA_COMPONENTS Bluetooth) + list(APPEND QT_EXTRA_LIBRARIES Qt5::Bluetooth) endif() -find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network ${WEBKIT_PKG} ${PRINTING_PKG} Svg Test LinguistTools ${QT_QUICK_PKG} ${ANDROID_PKG} Bluetooth Location) -set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network ${WEBKIT_LIB} ${PRINTING_LIB} Qt5::Svg ${QT_QUICK_LIB} ${ANDROID_LIB} Qt5::Bluetooth Qt5::Positioning) + +find_package(Qt5 REQUIRED COMPONENTS Core Concurrent Widgets Network Svg Test LinguistTools OOLCHAIN_LOCATION ${QT_EXTRA_COMPONENTS}) +set(QT_LIBRARIES Qt5::Core Qt5::Concurrent Qt5::Widgets Qt5::Network Qt5::Svg Qt5::Positioning ${QT_EXTRA_LIBRARIES}) set(QT_TEST_LIBRARIES ${QT_LIBRARIES} Qt5::Test) if (BTSUPPORT AND "${Qt5Core_VERSION_STRING}" STRLESS "5.4.0") @@ -141,6 +140,8 @@ if(BTSUPPORT) add_definitions(-DBT_SUPPORT) endif() +set(SUBSURFACE_LINK_LIBRARIES ${SUBSURFACE_LINK_LIBRARIES} ${LIBDIVECOMPUTER_LIBRARIES} ${LIBGIT2_LIBRARIES} ${LIBUSB_LIBRARIES}) + # set up the different target platforms if(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(SUBSURFACE_TARGET subsurface) |