forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -111,6 +111,14 @@ endif()
|
|||||||
find_package(LLVM QUIET)
|
find_package(LLVM QUIET)
|
||||||
find_package(Clang COMPONENTS libclang 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")
|
set(_IDE_APP_PATH "bin")
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ if (WIN32)
|
|||||||
set(PLATFORM_DEPENDS user32 iphlpapi ws2_32 shell32)
|
set(PLATFORM_DEPENDS user32 iphlpapi ws2_32 shell32)
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
set(PLATFORM_SOURCES ${MAC_SOURCES})
|
set(PLATFORM_SOURCES ${MAC_SOURCES})
|
||||||
find_library(FWFoundation Foundation)
|
|
||||||
find_library(FWAppKit AppKit)
|
|
||||||
set(PLATFORM_DEPENDS ${FWFoundation} ${FWAppKit})
|
set(PLATFORM_DEPENDS ${FWFoundation} ${FWAppKit})
|
||||||
else()
|
else()
|
||||||
set(PLATFORM_SOURCES ${UNIX_SOURCES})
|
set(PLATFORM_SOURCES ${UNIX_SOURCES})
|
||||||
|
|||||||
@@ -164,9 +164,8 @@ extend_qtc_plugin(Core
|
|||||||
SOURCES progressmanager/progressmanager_win.cpp
|
SOURCES progressmanager/progressmanager_win.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(FWAppKit AppKit)
|
|
||||||
extend_qtc_plugin(Core
|
extend_qtc_plugin(Core
|
||||||
CONDITION APPLE AND FWAppKit
|
CONDITION APPLE
|
||||||
DEPENDS ${FWAppKit}
|
DEPENDS ${FWAppKit}
|
||||||
SOURCES
|
SOURCES
|
||||||
progressmanager/progressmanager_mac.mm
|
progressmanager/progressmanager_mac.mm
|
||||||
|
|||||||
@@ -29,10 +29,8 @@ add_qtc_plugin(Help
|
|||||||
xbelsupport.cpp xbelsupport.h
|
xbelsupport.cpp xbelsupport.h
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(FWWebKit WebKit)
|
|
||||||
find_library(FWAppKit AppKit)
|
|
||||||
extend_qtc_plugin(Help
|
extend_qtc_plugin(Help
|
||||||
CONDITION APPLE AND FWWebKit AND FWAppKit
|
CONDITION FWWebKit AND FWAppKit
|
||||||
DEPENDS ${FWWebKit} ${FWAppKit}
|
DEPENDS ${FWWebKit} ${FWAppKit}
|
||||||
DEFINES QTC_MAC_NATIVE_HELPVIEWER
|
DEFINES QTC_MAC_NATIVE_HELPVIEWER
|
||||||
SOURCES
|
SOURCES
|
||||||
|
|||||||
@@ -26,9 +26,7 @@ add_qtc_plugin(Ios
|
|||||||
simulatoroperationdialog.cpp simulatoroperationdialog.h simulatoroperationdialog.ui
|
simulatoroperationdialog.cpp simulatoroperationdialog.h simulatoroperationdialog.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(FWCoreFoundation CoreFoundation)
|
|
||||||
find_library(FWIOKit IOKit)
|
|
||||||
extend_qtc_plugin(Ios
|
extend_qtc_plugin(Ios
|
||||||
CONDITION APPLE AND FWCoreFoundation AND FWIOKit
|
CONDITION APPLE
|
||||||
DEPENDS ${FWCoreFoundation} ${FWIOKit}
|
DEPENDS ${FWCoreFoundation} ${FWIOKit}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user