2014-02-26 22:43:31 -08:00
|
|
|
project(mac-capture)
|
|
|
|
|
|
|
|
find_library(COREAUDIO CoreAudio)
|
|
|
|
find_library(AUDIOUNIT AudioUnit)
|
|
|
|
find_library(COREFOUNDATION CoreFoundation)
|
2014-07-10 21:43:21 -07:00
|
|
|
find_library(IOSURF IOSurface)
|
|
|
|
find_library(COCOA Cocoa)
|
2022-06-04 20:35:15 -07:00
|
|
|
find_library(COREVIDEO CoreVideo)
|
|
|
|
find_library(COREMEDIA CoreMedia)
|
|
|
|
find_library(SCREENCAPTUREKIT ScreenCaptureKit)
|
2014-02-26 22:43:31 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
add_library(mac-capture MODULE)
|
|
|
|
add_library(OBS::capture ALIAS mac-capture)
|
2014-02-26 22:43:31 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
target_sources(
|
|
|
|
mac-capture
|
|
|
|
PRIVATE plugin-main.c
|
|
|
|
audio-device-enum.c
|
|
|
|
audio-device-enum.h
|
|
|
|
mac-audio.c
|
|
|
|
mac-display-capture.m
|
2022-06-04 20:35:15 -07:00
|
|
|
mac-screen-capture.m
|
2022-03-16 23:10:42 +01:00
|
|
|
mac-window-capture.m
|
|
|
|
window-utils.m
|
|
|
|
window-utils.h)
|
2014-03-04 07:10:33 -07:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
target_link_libraries(mac-capture PRIVATE OBS::libobs ${COREAUDIO} ${AUDIOUNIT}
|
|
|
|
${COREFOUNDATION} ${IOSURF} ${COCOA})
|
2020-05-13 06:37:01 -07:00
|
|
|
|
2022-06-04 20:35:15 -07:00
|
|
|
if(SCREENCAPTUREKIT)
|
|
|
|
target_link_libraries(mac-capture PRIVATE OBS::libobs ${COREVIDEO}
|
|
|
|
${COREMEDIA})
|
|
|
|
|
|
|
|
target_link_options(mac-capture PRIVATE SHELL:-weak_framework
|
|
|
|
ScreenCaptureKit)
|
|
|
|
target_link_options(libobs PRIVATE SHELL:-weak_framework ScreenCaptureKit)
|
|
|
|
endif()
|
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
set_target_properties(mac-capture PROPERTIES FOLDER "plugins" PREFIX "")
|
2014-02-26 22:43:31 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
setup_plugin_target(mac-capture)
|