diff options
-rw-r--r-- | CMakeLists.txt | 21 | ||||
-rw-r--r-- | cmake/Modules/HandleFindGrantlee.cmake | 4 | ||||
-rw-r--r-- | cmake/Modules/HandleUserManual.cmake | 4 |
3 files changed, 15 insertions, 14 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) diff --git a/cmake/Modules/HandleFindGrantlee.cmake b/cmake/Modules/HandleFindGrantlee.cmake index 0abb763df..ddc253840 100644 --- a/cmake/Modules/HandleFindGrantlee.cmake +++ b/cmake/Modules/HandleFindGrantlee.cmake @@ -10,6 +10,6 @@ else() find_package(Grantlee5 REQUIRED) set(GRANTLEE_LIBRARIES Grantlee5::Templates) endif() - set(PRINTING_PKG PrintSupport) - set(PRINTING_LIB Qt5::PrintSupport) + LIST(APPEND QT_EXTRA_COMPONENTS PrintSupport) + LIST(APPEND QT_EXTRA_LIBRARIES Qt5::PrintSupport) endif() diff --git a/cmake/Modules/HandleUserManual.cmake b/cmake/Modules/HandleUserManual.cmake index eeac35c5b..6e4874c60 100644 --- a/cmake/Modules/HandleUserManual.cmake +++ b/cmake/Modules/HandleUserManual.cmake @@ -2,6 +2,6 @@ if(NO_USERMANUAL) message(STATUS "building without usermanual") add_definitions(-DNO_USERMANUAL) else() - set(WEBKIT_PKG WebKitWidgets) - set(WEBKIT_LIB Qt5::WebKitWidgets) + list(APPEND QT_EXTRA_COMPONENTS WebKitWidgets) + list(APPEND QT_EXTRA_LIBRARIES Qt5::WebKitWidgets) endif() |