0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
obs-studio/plugins/coreaudio-encoder/CMakeLists.txt
tytan652 31385006d5 Remove legacy_check CMake macro
The macro was not removed in 72428ccd97
waiting for submodules to be be updated to a commit where their legacy
code path is removed.
2024-09-11 13:24:39 -04:00

31 lines
1003 B
CMake

cmake_minimum_required(VERSION 3.24...3.25)
if(OS_WINDOWS)
option(ENABLE_COREAUDIO_ENCODER "Enable building with CoreAudio encoder (Windows)" ON)
if(NOT ENABLE_COREAUDIO_ENCODER)
target_disable(coreaudio-encoder)
return()
endif()
endif()
add_library(coreaudio-encoder MODULE)
add_library(OBS::coreaudio-encoder ALIAS coreaudio-encoder)
target_sources(coreaudio-encoder PRIVATE encoder.cpp $<$<PLATFORM_ID:Windows>:windows-imports.h>)
target_link_libraries(
coreaudio-encoder
PRIVATE
OBS::libobs
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,AudioToolbox.framework>>"
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreAudio.framework>>"
"$<$<PLATFORM_ID:Darwin>:$<LINK_LIBRARY:FRAMEWORK,CoreFoundation.framework>>"
)
if(OS_WINDOWS)
configure_file(cmake/windows/obs-module.rc.in coreaudio-encoder.rc)
target_sources(coreaudio-encoder PRIVATE coreaudio-encoder.rc)
endif()
set_target_properties_obs(coreaudio-encoder PROPERTIES FOLDER plugins PREFIX "")