|
|
|
|
|
|
|
|
set(H264_LIBS "WIN") # may be LIBAV in the future |
|
|
set(H264_LIBS "WIN") # may be LIBAV in the future |
|
|
set(H264_LIBRARIES ole32 mfplat mfuuid wmcodecdspuuid) |
|
|
set(H264_LIBRARIES ole32 mfplat mfuuid wmcodecdspuuid) |
|
|
else() |
|
|
else() |
|
|
check_include_files(libavcodec/avcodec.h HAVE_AVCODEC_H) |
|
|
|
|
|
check_include_files(libavutil/avutil.h HAVE_AVUTIL_H) |
|
|
|
|
|
check_include_files(libswscale/swscale.h HAVE_SWSCALE_H) |
|
|
|
|
|
if (HAVE_AVCODEC_H AND HAVE_AVUTIL_H AND HAVE_SWSCALE_H) |
|
|
|
|
|
find_path(AVCODEC_INCLUDE_DIR libavcodec/avcodec.h) |
|
|
|
|
|
find_library(AVCODEC_LIBRARY avcodec) |
|
|
|
|
|
find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h) |
|
|
|
|
|
find_library(AVUTIL_LIBRARY avutil) |
|
|
|
|
|
find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h) |
|
|
|
|
|
find_library(SWSCALE_LIBRARY swscale) |
|
|
|
|
|
|
|
|
find_package(Ffmpeg) |
|
|
|
|
|
if (AVCODEC_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND) |
|
|
set(H264_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIRS} ${SWSCALE_INCLUDE_DIRS}) |
|
|
set(H264_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIRS} ${SWSCALE_INCLUDE_DIRS}) |
|
|
set(H264_LIBRARIES ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY}) |
|
|
|
|
|
|
|
|
set(H264_LIBRARIES ${AVCODEC_LIBRARIES} ${AVUTIL_LIBRARIES} ${SWSCALE_LIBRARIES}) |
|
|
|
|
|
set(H264_LIBRARY_DIRS ${AVCODEC_LIBRARY_DIRS} ${AVUTIL_LIBRARY_DIRS} ${SWSCALE_LIBRARY_DIRS}) |
|
|
add_definitions("-D__STDC_CONSTANT_MACROS") |
|
|
add_definitions("-D__STDC_CONSTANT_MACROS") |
|
|
add_definitions("-DHAVE_H264") |
|
|
add_definitions("-DHAVE_H264") |
|
|
set(H264_LIBS "LIBAV") |
|
|
set(H264_LIBS "LIBAV") |