Fix build of qmake on macOS

Two changes were needed:
- correctly link against frameworks
- use qcore_mac.cpp instead of qcore_mac_objc.mm, because we don't
  link against AppKit

Change-Id: Ibd9d6d367a7fcdf7dce277c1b06d36c491294eeb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Alexandru Croitor 2019-02-27 13:52:57 +01:00
parent 58bd86443c
commit 84af8f9b0b

View File

@ -1,5 +1,9 @@
install(DIRECTORY "${PROJECT_SOURCE_DIR}/mkspecs" DESTINATION ${INSTALL_DATADIR})
find_library(FWApplicationServices ApplicationServices)
find_library(FWCoreServices CoreServices)
find_library(FWFoundation Foundation)
add_qt_tool(qmake
SOURCES
meta.cpp
@ -123,13 +127,11 @@ extend_target(qmake CONDITION UNIX
extend_target(qmake CONDITION APPLE_OSX
SOURCES
${PROJECT_SOURCE_DIR}/src/corelib/kernel/qcore_foundation.mm
${PROJECT_SOURCE_DIR}/src/corelib/kernel/qcore_mac_objc.mm
${PROJECT_SOURCE_DIR}/src/corelib/kernel/qcore_mac.cpp
${PROJECT_SOURCE_DIR}/src/corelib/global/qoperatingsystemversion_darwin.mm
${PROJECT_SOURCE_DIR}/src/corelib/io/qsettings_mac.cpp
LIBRARIES
-framework ApplicationServices
-framework CoreServices
-framework Foundation
${FWApplicationServices} ${FWCoreServices} ${FWFoundation}
)
# TODO: Windows support, cf. qmake.pro