SIMDE was introduced for aarch64 support, however, the library itself supports non-SIMD fallback, which allows us provide support to other platforms without code changes. There is another world beyond x86. So we can simply enable SIMDE for processors without SSE2 support. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
44 lines
777 B
CMake
44 lines
777 B
CMake
project(media-playback)
|
|
|
|
find_package(FFmpeg REQUIRED
|
|
COMPONENTS avcodec avdevice avutil avformat)
|
|
|
|
include_directories(
|
|
${CMAKE_SOURCE_DIR}/libobs
|
|
${FFMPEG_INCLUDE_DIRS}
|
|
)
|
|
|
|
set(media-playback_HEADERS
|
|
media-playback/closest-format.h
|
|
media-playback/decode.h
|
|
media-playback/media.h
|
|
)
|
|
set(media-playback_SOURCES
|
|
media-playback/decode.c
|
|
media-playback/media.c
|
|
)
|
|
|
|
add_library(media-playback STATIC
|
|
${media-playback_HEADERS}
|
|
${media-playback_SOURCES}
|
|
)
|
|
|
|
target_compile_options(media-playback
|
|
PUBLIC
|
|
${ARCH_SIMD_FLAGS})
|
|
|
|
target_include_directories(media-playback
|
|
PUBLIC .
|
|
)
|
|
|
|
|
|
if(NOT MSVC)
|
|
if(NOT MINGW)
|
|
target_compile_options(media-playback PRIVATE -fPIC)
|
|
endif()
|
|
endif()
|
|
|
|
target_link_libraries(media-playback
|
|
${FFMPEG_LIBRARIES}
|
|
)
|