From 4cbd07b81f1cbe2b3419f721cc3bce66cd9798aa Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 23 Jan 2017 23:58:33 -0800 Subject: [PATCH] CMake: remove unneeded macOS frameworks --- CMakeLists.txt | 30 +++++++------------ Externals/wxWidgets3/CMakeLists.txt | 3 +- .../wxWidgets3/include/wx/osx/cocoa/chkconf.h | 2 +- Externals/wxWidgets3/wx/wxcocoa.h | 2 +- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 583267c7d0..a9cc850481 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -311,9 +311,6 @@ if(APPLE) set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};/usr") endif() - # Do not warn about frameworks that are not available on all architectures. - # This avoids a warning when linking with QuickTime. - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_arch_warnings") # Specify target CPUs. set(TARGET_FLAGS "${TARGET_FLAGS} -mssse3") set(TARGET_FLAGS "${TARGET_FLAGS} -march=core2") @@ -332,7 +329,6 @@ if(APPLE) find_library(APPKIT_LIBRARY AppKit) find_library(APPSERV_LIBRARY ApplicationServices) - find_library(ATB_LIBRARY AudioToolbox) find_library(AU_LIBRARY AudioUnit) find_library(CARBON_LIBRARY Carbon) find_library(COCOA_LIBRARY Cocoa) @@ -342,10 +338,19 @@ if(APPLE) find_library(FOUNDATION_LIBRARY Foundation) find_library(IOB_LIBRARY IOBluetooth) find_library(IOK_LIBRARY IOKit) - find_library(QUICKTIME_LIBRARY QuickTime) - find_library(WEBKIT_LIBRARY WebKit) find_library(FORCEFEEDBACK ForceFeedback) find_library(OPENGL_LIBRARY OpenGL) + + # Link against OS X system frameworks. + list(APPEND LIBS + ${APPKIT_LIBRARY} + ${AU_LIBRARY} + ${COREAUDIO_LIBRARY} + ${COREFUND_LIBRARY} + ${CORESERV_LIBRARY} + ${IOK_LIBRARY} + ${FORCEFEEDBACK} + ) endif() if(WIN32) @@ -1010,19 +1015,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD") set(LIBS ${LIBS} usbhid) endif() -if(APPLE) - # Link against OS X system frameworks. - list(APPEND LIBS - ${APPKIT_LIBRARY} - ${AU_LIBRARY} - ${COREAUDIO_LIBRARY} - ${COREFUND_LIBRARY} - ${CORESERV_LIBRARY} - ${IOK_LIBRARY} - ${FORCEFEEDBACK} - ) -endif() - ######################################## # Pre-build events: Define configuration variables and write SCM info header # diff --git a/Externals/wxWidgets3/CMakeLists.txt b/Externals/wxWidgets3/CMakeLists.txt index 1f09e3318e..5ec5080cdc 100644 --- a/Externals/wxWidgets3/CMakeLists.txt +++ b/Externals/wxWidgets3/CMakeLists.txt @@ -837,14 +837,13 @@ if(APPLE) iconv ${APPKIT_LIBRARY} ${APPSERV_LIBRARY} - ${ATB_LIBRARY} ${CARBON_LIBRARY} ${COCOA_LIBRARY} ${COREFUND_LIBRARY} ${CORESERV_LIBRARY} ${IOK_LIBRARY} ${OPENGL_LIBRARY} - ${QUICKTIME_LIBRARY}) + ) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h b/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h index 4cb5623b49..8d8818e5d0 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h @@ -48,7 +48,7 @@ */ #define wxOSX_USE_QUICKTIME 0 -#define wxOSX_USE_AUDIOTOOLBOX 1 +#define wxOSX_USE_AUDIOTOOLBOX 0 /* Use the more efficient FSEvents API instead of kqueue diff --git a/Externals/wxWidgets3/wx/wxcocoa.h b/Externals/wxWidgets3/wx/wxcocoa.h index 24e0ba0398..53be5f174c 100644 --- a/Externals/wxWidgets3/wx/wxcocoa.h +++ b/Externals/wxWidgets3/wx/wxcocoa.h @@ -875,7 +875,7 @@ /* * wxWebKitCtrl */ -#define wxUSE_WEBKIT 1 +#define wxUSE_WEBKIT 0 /* * Objective-C class name uniquifying