2022-03-16 23:10:42 +01:00
|
|
|
option(ENABLE_WINMF "Enable building with deprecated win-mf plugin" OFF)
|
|
|
|
mark_as_advanced(ENABLE_WINMF)
|
2018-02-25 22:37:56 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
project(win-mf)
|
2018-02-25 22:37:56 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
add_library(win-mf MODULE)
|
|
|
|
add_library(OBS::win-mf ALIAS win-mf)
|
2018-02-25 22:37:56 -08:00
|
|
|
|
2019-06-16 21:42:58 +10:00
|
|
|
set(MODULE_DESCRIPTION "OBS Windows Media Foundations H.264/AAC encoder")
|
2022-03-16 23:10:42 +01:00
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/bundle/windows/obs-module.rc.in
|
|
|
|
win-mf.rc)
|
2018-02-25 22:37:56 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
target_sources(win-mf PRIVATE win-mf.rc)
|
2018-02-25 22:37:56 -08:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
if(ENABLE_WINMF)
|
|
|
|
target_sources(
|
|
|
|
win-mf
|
|
|
|
PRIVATE mf-plugin.cpp
|
|
|
|
mf-aac.cpp
|
|
|
|
mf-aac-encoder.cpp
|
|
|
|
mf-aac-encoder.hpp
|
|
|
|
mf-common.cpp
|
|
|
|
mf-common.hpp
|
|
|
|
mf-encoder-descriptor.cpp
|
|
|
|
mf-encoder-descriptor.hpp
|
|
|
|
mf-h264.cpp
|
|
|
|
mf-h264-encoder.cpp
|
|
|
|
mf-h264-encoder.hpp)
|
|
|
|
|
|
|
|
target_link_libraries(
|
|
|
|
win-mf
|
|
|
|
PRIVATE d3d9
|
|
|
|
dxva2
|
|
|
|
uuid
|
|
|
|
mfplat
|
|
|
|
mfuuid
|
|
|
|
mf
|
|
|
|
wmcodecdspuuid)
|
|
|
|
|
|
|
|
target_compile_definitions(win-mf PRIVATE ENABLE_WINMF)
|
2018-02-25 22:37:56 -08:00
|
|
|
else()
|
2022-03-16 23:10:42 +01:00
|
|
|
target_sources(win-mf PRIVATE mf-plugin.cpp win-mf.rc)
|
2018-02-25 22:37:56 -08:00
|
|
|
endif()
|
2015-06-06 22:08:53 -05:00
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
target_link_libraries(win-mf PRIVATE OBS::libobs)
|
2018-02-25 22:37:56 -08:00
|
|
|
|
2020-05-13 06:37:01 -07:00
|
|
|
set_target_properties(win-mf PROPERTIES FOLDER "plugins")
|
|
|
|
|
2022-03-16 23:10:42 +01:00
|
|
|
setup_plugin_target(win-mf)
|