Fixed set of libraries needed to build on Mac OS X
authorSam Lantinga <slouken@libsdl.org>
Thu, 15 Sep 2016 08:57:56 -0700
changeset 103494b978b7998aa
parent 10348 58e8745fb4e1
child 10350 130fc0b68ca8
Fixed set of libraries needed to build on Mac OS X
CMakeLists.txt
Xcode/SDL/SDL.xcodeproj/project.pbxproj
configure
configure.in
     1.1 --- a/CMakeLists.txt	Thu Sep 15 08:46:14 2016 -0700
     1.2 +++ b/CMakeLists.txt	Thu Sep 15 08:57:56 2016 -0700
     1.3 @@ -1209,7 +1209,8 @@
     1.4      file(GLOB AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/coreaudio/*.m)
     1.5      set(SOURCE_FILES ${SOURCE_FILES} ${AUDIO_SOURCES})
     1.6      set(HAVE_SDL_AUDIO TRUE)
     1.7 -    set(SDL_FRAMEWORK_AVFOUNDATION 1)
     1.8 +    set(SDL_FRAMEWORK_COREAUDIO 1)
     1.9 +    set(SDL_FRAMEWORK_AUDIOTOOLBOX 1)
    1.10    endif()
    1.11  
    1.12    if(SDL_JOYSTICK)
    1.13 @@ -1278,9 +1279,13 @@
    1.14      find_library(CARBON_LIBRARY Carbon)
    1.15      list(APPEND EXTRA_LIBS ${CARBON_LIBRARY})
    1.16    endif()
    1.17 -  if(SDL_FRAMEWORK_AVFOUNDATION)
    1.18 -    find_library(AVFOUNDATION AVFoundation)
    1.19 -    list(APPEND EXTRA_LIBS ${AVFOUNDATION})
    1.20 +  if(SDL_FRAMEWORK_COREAUDIO)
    1.21 +    find_library(COREAUDIO CoreAudio)
    1.22 +    list(APPEND EXTRA_LIBS ${COREAUDIO})
    1.23 +  endif()
    1.24 +  if(SDL_FRAMEWORK_AUDIOTOOLBOX)
    1.25 +    find_library(AUDIOTOOLBOX AudioToolbox)
    1.26 +    list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
    1.27    endif()
    1.28  
    1.29    # iOS hack needed - http://code.google.com/p/ios-cmake/ ?
     2.1 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Thu Sep 15 08:46:14 2016 -0700
     2.2 +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Thu Sep 15 08:57:56 2016 -0700
     2.3 @@ -7,15 +7,9 @@
     2.4  	objects = {
     2.5  
     2.6  /* Begin PBXBuildFile section */
     2.7 -		007317A20858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
     2.8 -		007317A30858DECD00B2BC32 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
     2.9  		007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
    2.10 -		007317A50858DECD00B2BC32 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179E0858DECD00B2BC32 /* CoreAudio.framework */; };
    2.11  		007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
    2.12 -		007317A90858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
    2.13 -		007317AA0858DECD00B2BC32 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
    2.14  		007317AB0858DECD00B2BC32 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
    2.15 -		007317AC0858DECD00B2BC32 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179E0858DECD00B2BC32 /* CoreAudio.framework */; };
    2.16  		007317AD0858DECD00B2BC32 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
    2.17  		007317C30858E15000B2BC32 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; };
    2.18  		00CFA89D106B4BA100758660 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
    2.19 @@ -402,6 +396,8 @@
    2.20  		56A6702A185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
    2.21  		56A6702B185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
    2.22  		56A6702C185654B40007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A67020185654B40007D20F /* SDL_dynapi_overrides.h */; };
    2.23 +		A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E951D8B69D600B177DD /* CoreAudio.framework */; };
    2.24 +		A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7381E931D8B69C300B177DD /* AudioToolbox.framework */; };
    2.25  		A77E6EB4167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; };
    2.26  		A77E6EB5167AB0A90010E40B /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */; settings = {ATTRIBUTES = (Public, ); }; };
    2.27  		AA0AD09D16648D1700CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = BBFC088A164C6514003E6A99 /* SDL_gamecontroller.c */; };
    2.28 @@ -796,10 +792,7 @@
    2.29  		DB31406817554B71006C0E22 /* SDL_x11xinput2.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628ACF159367F2005138DD /* SDL_x11xinput2.c */; };
    2.30  		DB31406917554B71006C0E22 /* SDL_x11messagebox.c in Sources */ = {isa = PBXBuildFile; fileRef = AA9E4092163BE51E007A2AD0 /* SDL_x11messagebox.c */; };
    2.31  		DB31406A17554B71006C0E22 /* SDL_cocoamessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC38C164063D200AB8930 /* SDL_cocoamessagebox.m */; };
    2.32 -		DB31406C17554B71006C0E22 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179B0858DECD00B2BC32 /* AudioToolbox.framework */; };
    2.33 -		DB31406D17554B71006C0E22 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179C0858DECD00B2BC32 /* AudioUnit.framework */; };
    2.34  		DB31406E17554B71006C0E22 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179D0858DECD00B2BC32 /* Cocoa.framework */; };
    2.35 -		DB31406F17554B71006C0E22 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179E0858DECD00B2BC32 /* CoreAudio.framework */; };
    2.36  		DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0073179F0858DECD00B2BC32 /* IOKit.framework */; };
    2.37  		DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 007317C10858E15000B2BC32 /* Carbon.framework */; };
    2.38  		DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00CFA89C106B4BA100758660 /* ForceFeedback.framework */; };
    2.39 @@ -821,10 +814,7 @@
    2.40  /* End PBXContainerItemProxy section */
    2.41  
    2.42  /* Begin PBXFileReference section */
    2.43 -		0073179B0858DECD00B2BC32 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
    2.44 -		0073179C0858DECD00B2BC32 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
    2.45  		0073179D0858DECD00B2BC32 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
    2.46 -		0073179E0858DECD00B2BC32 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
    2.47  		0073179F0858DECD00B2BC32 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
    2.48  		007317C10858E15000B2BC32 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
    2.49  		00794D3F09D0C461003FC8A1 /* License.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = License.txt; sourceTree = "<group>"; };
    2.50 @@ -1020,6 +1010,8 @@
    2.51  		56A6701E185654B40007D20F /* SDL_dynapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_dynapi.c; path = ../../src/dynapi/SDL_dynapi.c; sourceTree = "<group>"; };
    2.52  		56A6701F185654B40007D20F /* SDL_dynapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi.h; path = ../../src/dynapi/SDL_dynapi.h; sourceTree = "<group>"; };
    2.53  		56A67020185654B40007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_dynapi_overrides.h; path = ../../src/dynapi/SDL_dynapi_overrides.h; sourceTree = "<group>"; };
    2.54 +		A7381E931D8B69C300B177DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
    2.55 +		A7381E951D8B69D600B177DD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
    2.56  		A77E6EB3167AB0A90010E40B /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
    2.57  		AA0F8490178D5ECC00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = "<group>"; };
    2.58  		AA628AC8159367B7005138DD /* SDL_rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rotate.c; sourceTree = "<group>"; };
    2.59 @@ -1107,11 +1099,10 @@
    2.60  			isa = PBXFrameworksBuildPhase;
    2.61  			buildActionMask = 2147483647;
    2.62  			files = (
    2.63 +				A7381E971D8B6A0300B177DD /* AudioToolbox.framework in Frameworks */,
    2.64 +				A7381E961D8B69D600B177DD /* CoreAudio.framework in Frameworks */,
    2.65  				FA73671D19A540EF004122E4 /* CoreVideo.framework in Frameworks */,
    2.66 -				007317A20858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */,
    2.67 -				007317A30858DECD00B2BC32 /* AudioUnit.framework in Frameworks */,
    2.68  				007317A40858DECD00B2BC32 /* Cocoa.framework in Frameworks */,
    2.69 -				007317A50858DECD00B2BC32 /* CoreAudio.framework in Frameworks */,
    2.70  				007317A60858DECD00B2BC32 /* IOKit.framework in Frameworks */,
    2.71  				00D0D08410675DD9004B05EF /* CoreFoundation.framework in Frameworks */,
    2.72  				00D0D0D810675E46004B05EF /* Carbon.framework in Frameworks */,
    2.73 @@ -1124,10 +1115,7 @@
    2.74  			buildActionMask = 2147483647;
    2.75  			files = (
    2.76  				FA73671E19A54140004122E4 /* CoreVideo.framework in Frameworks */,
    2.77 -				007317A90858DECD00B2BC32 /* AudioToolbox.framework in Frameworks */,
    2.78 -				007317AA0858DECD00B2BC32 /* AudioUnit.framework in Frameworks */,
    2.79  				007317AB0858DECD00B2BC32 /* Cocoa.framework in Frameworks */,
    2.80 -				007317AC0858DECD00B2BC32 /* CoreAudio.framework in Frameworks */,
    2.81  				007317AD0858DECD00B2BC32 /* IOKit.framework in Frameworks */,
    2.82  				007317C30858E15000B2BC32 /* Carbon.framework in Frameworks */,
    2.83  				DB31408B17554D37006C0E22 /* ForceFeedback.framework in Frameworks */,
    2.84 @@ -1139,10 +1127,7 @@
    2.85  			buildActionMask = 2147483647;
    2.86  			files = (
    2.87  				FA73671F19A54144004122E4 /* CoreVideo.framework in Frameworks */,
    2.88 -				DB31406C17554B71006C0E22 /* AudioToolbox.framework in Frameworks */,
    2.89 -				DB31406D17554B71006C0E22 /* AudioUnit.framework in Frameworks */,
    2.90  				DB31406E17554B71006C0E22 /* Cocoa.framework in Frameworks */,
    2.91 -				DB31406F17554B71006C0E22 /* CoreAudio.framework in Frameworks */,
    2.92  				DB31407017554B71006C0E22 /* IOKit.framework in Frameworks */,
    2.93  				DB31407217554B71006C0E22 /* Carbon.framework in Frameworks */,
    2.94  				DB31408D17554D3C006C0E22 /* ForceFeedback.framework in Frameworks */,
    2.95 @@ -1730,13 +1715,12 @@
    2.96  		BEC562FE0761C0E800A33029 /* Linked Frameworks */ = {
    2.97  			isa = PBXGroup;
    2.98  			children = (
    2.99 +				A7381E931D8B69C300B177DD /* AudioToolbox.framework */,
   2.100 +				A7381E951D8B69D600B177DD /* CoreAudio.framework */,
   2.101  				FA73671C19A540EF004122E4 /* CoreVideo.framework */,
   2.102  				00D0D08310675DD9004B05EF /* CoreFoundation.framework */,
   2.103  				007317C10858E15000B2BC32 /* Carbon.framework */,
   2.104 -				0073179B0858DECD00B2BC32 /* AudioToolbox.framework */,
   2.105 -				0073179C0858DECD00B2BC32 /* AudioUnit.framework */,
   2.106  				0073179D0858DECD00B2BC32 /* Cocoa.framework */,
   2.107 -				0073179E0858DECD00B2BC32 /* CoreAudio.framework */,
   2.108  				0073179F0858DECD00B2BC32 /* IOKit.framework */,
   2.109  				00CFA89C106B4BA100758660 /* ForceFeedback.framework */,
   2.110  			);
     3.1 --- a/configure	Thu Sep 15 08:46:14 2016 -0700
     3.2 +++ b/configure	Thu Sep 15 08:57:56 2016 -0700
     3.3 @@ -23529,7 +23529,7 @@
     3.4  $as_echo "#define SDL_AUDIO_DRIVER_COREAUDIO 1" >>confdefs.h
     3.5  
     3.6              SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
     3.7 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
     3.8 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox"
     3.9              SUMMARY_audio="${SUMMARY_audio} coreaudio"
    3.10              have_audio=yes
    3.11          fi
     4.1 --- a/configure.in	Thu Sep 15 08:46:14 2016 -0700
     4.2 +++ b/configure.in	Thu Sep 15 08:57:56 2016 -0700
     4.3 @@ -3316,7 +3316,7 @@
     4.4          if test x$enable_audio = xyes; then
     4.5              AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
     4.6              SOURCES="$SOURCES $srcdir/src/audio/coreaudio/*.m"
     4.7 -            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
     4.8 +            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox"
     4.9              SUMMARY_audio="${SUMMARY_audio} coreaudio"
    4.10              have_audio=yes
    4.11          fi