diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-05-24 09:49:24 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-05-24 13:04:15 +0000 |
commit | 52d48c75ae6e00561fe128e5ba954817d73ca4d4 (patch) | |
tree | 082d94e802bb585dc58a7c089d13a118e1d29c52 | |
parent | c4071d09adf41d4931944e8dc122ab4c6613c779 (diff) |
CMake build/macOS: Centrally detect system libraries
And realize that at most places (except native help viewer) the code
using them is not optional on macOS.
Change-Id: I308406a0e8f176dad4151d23a33cd3fc0fb8635c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/libs/utils/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/plugins/coreplugin/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/plugins/help/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/plugins/ios/CMakeLists.txt | 4 |
5 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 81cad0edc8..53b379c3b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,14 @@ endif() find_package(LLVM QUIET) find_package(Clang COMPONENTS libclang QUIET) +if (APPLE) + find_library(FWCoreFoundation CoreFoundation) + find_library(FWFoundation Foundation) + find_library(FWAppKit AppKit) + find_library(FWIOKit IOKit) + find_library(FWWebKit WebKit) +endif() + set(_IDE_APP_PATH "bin") if (APPLE) diff --git a/src/libs/utils/CMakeLists.txt b/src/libs/utils/CMakeLists.txt index 4e7f0ffa6e..4ee1491b12 100644 --- a/src/libs/utils/CMakeLists.txt +++ b/src/libs/utils/CMakeLists.txt @@ -21,8 +21,6 @@ if (WIN32) set(PLATFORM_DEPENDS user32 iphlpapi ws2_32 shell32) elseif (APPLE) set(PLATFORM_SOURCES ${MAC_SOURCES}) - find_library(FWFoundation Foundation) - find_library(FWAppKit AppKit) set(PLATFORM_DEPENDS ${FWFoundation} ${FWAppKit}) else() set(PLATFORM_SOURCES ${UNIX_SOURCES}) diff --git a/src/plugins/coreplugin/CMakeLists.txt b/src/plugins/coreplugin/CMakeLists.txt index 06eb1213fd..d591f8b8e5 100644 --- a/src/plugins/coreplugin/CMakeLists.txt +++ b/src/plugins/coreplugin/CMakeLists.txt @@ -164,9 +164,8 @@ extend_qtc_plugin(Core SOURCES progressmanager/progressmanager_win.cpp ) -find_library(FWAppKit AppKit) extend_qtc_plugin(Core - CONDITION APPLE AND FWAppKit + CONDITION APPLE DEPENDS ${FWAppKit} SOURCES progressmanager/progressmanager_mac.mm diff --git a/src/plugins/help/CMakeLists.txt b/src/plugins/help/CMakeLists.txt index 6b00fbeb49..7f3c05a75e 100644 --- a/src/plugins/help/CMakeLists.txt +++ b/src/plugins/help/CMakeLists.txt @@ -29,10 +29,8 @@ add_qtc_plugin(Help xbelsupport.cpp xbelsupport.h ) -find_library(FWWebKit WebKit) -find_library(FWAppKit AppKit) extend_qtc_plugin(Help - CONDITION APPLE AND FWWebKit AND FWAppKit + CONDITION FWWebKit AND FWAppKit DEPENDS ${FWWebKit} ${FWAppKit} DEFINES QTC_MAC_NATIVE_HELPVIEWER SOURCES diff --git a/src/plugins/ios/CMakeLists.txt b/src/plugins/ios/CMakeLists.txt index 4bc429e4f8..87f6d1dbcb 100644 --- a/src/plugins/ios/CMakeLists.txt +++ b/src/plugins/ios/CMakeLists.txt @@ -26,9 +26,7 @@ add_qtc_plugin(Ios simulatoroperationdialog.cpp simulatoroperationdialog.h simulatoroperationdialog.ui ) -find_library(FWCoreFoundation CoreFoundation) -find_library(FWIOKit IOKit) extend_qtc_plugin(Ios - CONDITION APPLE AND FWCoreFoundation AND FWIOKit + CONDITION APPLE DEPENDS ${FWCoreFoundation} ${FWIOKit} ) |