root/OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/CMakeLists.txt @ 9854

Revision 9854, 2.5 kB (checked in by robert, 5 years ago)

Added support for using libswscale

RevLine 
[9818]1# INCLUDE_DIRECTORIES( ${FFMPEG_INCLUDE_DIRS} )
[9816]2
[9854]3IF (FFMPEG_LIBSWSCALE_FOUND)
[9818]4
[9854]5    INCLUDE_DIRECTORIES(
6        ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/libavformat ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/ffmpeg
7        ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS}/libavdevice ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS}/ffmpeg
8        ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}/libavcodec ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}/ffmpeg
9        ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/libavcodec ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/ffmpeg
10        ${FFMPEG_LIBSWSCALE_INCLUDE_DIRS} ${FFMPEG_LIBSWSCALE_INCLUDE_DIRS}/libswscale ${FFMPEG_LIBSWSCALE_INCLUDE_DIRS}/ffmpeg
11    )
12
13    ADD_DEFINITIONS(-DUSE_SWSCALE)
14
15    LINK_DIRECTORIES(${FFMPEG_LIBRARY_DIRS})
16
17    SET(TARGET_EXTERNAL_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_LIBSWSCALE_LIBRARIES})
18
19ELSE(FFMPEG_LIBSWSCALE_FOUND)
20
21    INCLUDE_DIRECTORIES(
22        ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/libavformat ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}/ffmpeg
23        ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS}/libavdevice ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS}/ffmpeg
24        ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}/libavcodec ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}/ffmpeg
25        ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/libavcodec ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}/ffmpeg
26    )
27
28    LINK_DIRECTORIES(${FFMPEG_LIBRARY_DIRS})
29
30    SET(TARGET_EXTERNAL_LIBRARIES ${FFMPEG_LIBRARIES} )
31
32ENDIF()
33
[9839]34# MESSAGE("FFMPEG_LIBAVFORMAT_INCLUDE_DIRS = "  ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} )
35# MESSAGE("FFMPEG_LIBAVDEVICE_INCLUDE_DIRS = "  ${FFMPEG_LIBAVDEVICE_INCLUDE_DIRS} )
36# MESSAGE("FFMPEG_LIBAVCODEC_INCLUDE_DIRS = "  ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} )
37# MESSAGE("FFMPEG_LIBAVUTIL_INCLUDE_DIRS = "  ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} )
38# MESSAGE("FFMPEG_LIBRARIES = "  ${FFMPEG_LIBRARIES} )
[9818]39
[9816]40SET(TARGET_SRC
41    FFmpegClocks.cpp
42    FFmpegDecoderAudio.cpp
43    FFmpegDecoder.cpp
44    FFmpegDecoderVideo.cpp
45    FFmpegImageStream.cpp
[9847]46    FFmpegAudioStream.cpp
[9816]47    ReaderWriterFFmpeg.cpp
48)
49
50SET(TARGET_H
51    BoundedMessageQueue.hpp
52    FFmpegClocks.hpp
53    FFmpegDecoderAudio.hpp
54    FFmpegDecoder.hpp
55    FFmpegDecoderVideo.hpp
56    FFmpegHeaders.hpp
57    FFmpegPacket.hpp
[9847]58    FFmpegImageStream.hpp
59    FFmpegAudioStream.hpp
[9816]60    MessageQueue.hpp
61)
62
[9842]63
[9816]64
65#### end var setup  ###
[9839]66SETUP_PLUGIN(ffmpeg ffmpeg)
Note: See TracBrowser for help on using the browser.