1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-29 19:04:31 +00:00
openmw/extern/osg-ffmpeg-videoplayer/CMakeLists.txt
AnyOldName3 f39ba9783a Mark extern library includes as SYSTEM
With CMake 3.25, there's a target property we could use to deal with this with a little less mess, but we use 3.16 right now.
2025-09-23 01:13:47 +01:00

34 lines
1.3 KiB
CMake

set(OSG_FFMPEG_VIDEOPLAYER_LIBRARY "osg-ffmpeg-videoplayer")
# Sources
set(OSG_FFMPEG_VIDEOPLAYER_SOURCE_FILES
videoplayer.cpp
videostate.cpp
audiodecoder.cpp
include/osg-ffmpeg-videoplayer/audiodecoder.hpp
include/osg-ffmpeg-videoplayer/audiofactory.hpp
include/osg-ffmpeg-videoplayer/libavformatdefines.hpp
include/osg-ffmpeg-videoplayer/libavutildefines.hpp
include/osg-ffmpeg-videoplayer/videodefs.hpp
include/osg-ffmpeg-videoplayer/videoplayer.hpp
include/osg-ffmpeg-videoplayer/videostate.hpp
)
add_library(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} STATIC ${OSG_FFMPEG_VIDEOPLAYER_SOURCE_FILES})
target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} ${FFmpeg_LIBRARIES})
target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} ${OSG_LIBRARIES})
target_link_libraries(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} SDL2::SDL2)
target_include_directories(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} SYSTEM PUBLIC include ${FFmpeg_INCLUDE_DIRS})
target_include_directories(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} PRIVATE include/osg-ffmpeg-videoplayer)
if (MSVC AND PRECOMPILE_HEADERS_WITH_MSVC)
target_precompile_headers(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} PUBLIC
<memory>
<string>
<vector>
)
target_precompile_headers(${OSG_FFMPEG_VIDEOPLAYER_LIBRARY} PRIVATE <algorithm>)
endif()