diff --git a/CMakeLists.txt b/CMakeLists.txt index c97e91285a..0955483b45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,9 +85,24 @@ if(UNIX AND NOT APPLE) endif() if (APPLE) - add_definitions(-x objective-c++) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") + 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}) + endif() - + if(WIN32) add_definitions(-D_SECURE_SCL=0) add_definitions(-D_CRT_SECURE_NO_WARNINGS)