Link to the required OS X frameworks.

Previously, there was just one list of frameworks regardless of which part
of the code depended on which frameworks. Now we keep separate lists for
the Dolphin core, the Dolphin GUI and internal use by wxWidgets.
This commit is contained in:
Maarten ter Huurne 2011-12-07 08:26:44 +01:00
parent 8a75351674
commit f9133a7376
3 changed files with 40 additions and 21 deletions

View File

@ -107,21 +107,18 @@ if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")
FIND_LIBRARY(ATB_LIBRARY AudioToolbox)
FIND_LIBRARY(AU_LIBRARY AudioUnit)
FIND_LIBRARY(CARBON_LIBRARY Carbon)
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
FIND_LIBRARY(COREFUND_LIBRARY CoreFoundation)
FIND_LIBRARY(CORESERV_LIBRARY CoreServices)
FIND_LIBRARY(IOB_LIBRARY IOBluetooth)
FIND_LIBRARY(IOK_LIBRARY IOKit)
FIND_LIBRARY(OGL_LIBRARY OpenGL)
FIND_LIBRARY(WEBKIT_LIBRARY WebKit)
SET(EXTRA_LIBS ${ATB_LIBRARY} ${AU_LIBRARY} ${CARBON_LIBRARY}
${COCOA_LIBRARY} ${COREAUDIO_LIBRARY} ${COREFUND_LIBRARY}
${CORESERV_LIBRARY} ${IOB_LIBRARY} ${IOK_LIBRARY} ${OGL_LIBRARY}
${WEBKIT_LIBRARY})
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)
find_library(COREAUDIO_LIBRARY CoreAudio)
find_library(COREFUND_LIBRARY CoreFoundation)
find_library(CORESERV_LIBRARY CoreServices)
find_library(IOB_LIBRARY IOBluetooth)
find_library(IOK_LIBRARY IOKit)
find_library(WEBKIT_LIBRARY WebKit)
endif()
if(WIN32)

View File

@ -1239,7 +1239,17 @@ add_definitions(-D__WXOSX_COCOA__)
add_definitions(-DWXBUILDING)
add_definitions(-Wno-deprecated-declarations)
add_definitions(-Wno-shadow)
set(LIBS iconv)
set(LIBS
iconv
${APPKIT_LIBRARY}
${APPSERV_LIBRARY}
${ATB_LIBRARY}
${CARBON_LIBRARY}
${COCOA_LIBRARY}
${COREFUND_LIBRARY}
${CORESERV_LIBRARY}
${IOK_LIBRARY}
)
include_directories(../libpng)
add_subdirectory(../libpng ../libpng)

View File

@ -71,10 +71,22 @@ endif()
if(WIN32)
set(SRCS ${SRCS} Src/stdafx.cpp)
elseif((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND NOT wxWidgets_FOUND)
# TODO
elseif((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND wxWidgets_FOUND)
# TODO
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND LIBS
${APPKIT_LIBRARY}
${AU_LIBRARY}
${COREAUDIO_LIBRARY}
${COREFUND_LIBRARY}
${CORESERV_LIBRARY}
${IOB_LIBRARY}
${IOK_LIBRARY}
)
if(wxWidgets_FOUND)
list(APPEND LIBS
${APPSERV_LIBRARY}
${COCOA_LIBRARY}
)
endif()
else()
set(SRCS ${SRCS} Src/X11Utils.cpp)
endif()