2020-04-12 03:28:32 -07:00
|
|
|
project(oss-audio)
|
|
|
|
|
2022-03-16 15:10:42 -07:00
|
|
|
option(ENABLE_OSS "Enable building with OSS audio support" ON)
|
2020-04-12 03:28:32 -07:00
|
|
|
|
2022-03-16 15:10:42 -07:00
|
|
|
if(NOT ENABLE_OSS)
|
|
|
|
message(STATUS "OBS: DISABLED oss-audio")
|
|
|
|
return()
|
2020-04-12 03:28:32 -07:00
|
|
|
endif()
|
|
|
|
|
2022-03-16 15:10:42 -07:00
|
|
|
find_package(OSS REQUIRED)
|
|
|
|
|
|
|
|
add_library(oss-audio MODULE)
|
|
|
|
add_library(OBS::oss-audio ALIAS oss-audio)
|
|
|
|
|
|
|
|
target_sources(oss-audio PRIVATE oss-audio.c oss-input.c)
|
|
|
|
|
|
|
|
target_link_libraries(oss-audio PRIVATE OBS::libobs OSS::OSS)
|
|
|
|
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/oss-platform.h.in oss-platform.h)
|
|
|
|
|
|
|
|
target_include_directories(oss-audio PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
target_sources(oss-audio PRIVATE oss-platform.h)
|
|
|
|
|
2020-05-13 06:37:01 -07:00
|
|
|
set_target_properties(oss-audio PROPERTIES FOLDER "plugins")
|
2020-04-12 03:28:32 -07:00
|
|
|
|
2022-03-16 15:10:42 -07:00
|
|
|
setup_plugin_target(oss-audio)
|