CMake: MacOS cleanup

This commit is contained in:
Vicki Pfau 2021-06-10 00:05:58 -07:00
parent 3e1793d3f8
commit 588186531c
2 changed files with 5 additions and 4 deletions

View File

@ -582,8 +582,7 @@ if(USE_FFMPEG)
set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "libavcodec-extra|libavcodec-ffmpeg-extra${LIBAVCODEC_VERSION_MAJOR}")
endif()
if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework VideoDecodeAcceleration -framework CoreVideo")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework VideoDecodeAcceleration -framework CoreVideo")
list(APPEND DEPENDENCY_LIB "-framework VideoDecodeAcceleration" "-framework CoreVideo")
endif()
endif()

View File

@ -48,8 +48,10 @@ endif()
if(WIN32)
list(APPEND SDL_LIBRARY imm32 setupapi version winmm)
elseif(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework AppKit -framework AudioUnit -framework Carbon -framework CoreAudio -framework AudioToolbox -framework ForceFeedback -framework IOKit")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" PARENT_SCOPE)
list(APPEND SDL_LIBRARY "-framework AppKit" "-framework AudioUnit" "-framework Carbon" "-framework CoreAudio" "-framework AudioToolbox" "-framework ForceFeedback" "-framework IOKit")
if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "10.13")
list(APPEND SDL_LIBRARY "-framework Metal")
endif()
endif()
if(NOT SDLMAIN_LIBRARY)