-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
96 lines (79 loc) · 2.31 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 3.5)
if (PLATFORM STREQUAL "ARM")
include(cross.cmake)
set(CMAKE_CROSSCOMPILING on)
else ()
SET(CMAKE_FIND_ROOT_PATH /usr)
endif ()
project(ffvademo)
set(CMAKE_CXX_STANDARD 17)
# set(CMAKE_VERBOSE_MAKEFILE ON)
# set(ENV{PKG_CONFIG_PATH} /usr/lib/pkgconfig)
#find_package(PkgConfig REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
find_package(Threads)
#add_definitions(-DOPEN_DEBUG_LOG_OUTPUT)
add_definitions(-DUSE_EGL)
add_definitions(-DUSE_X11)
add_definitions(-DUSE_DRM)
add_definitions(-DUSE_VA_X11)
add_definitions(-DUSE_VA_VPP)
# add_definitions(-DUSE_GLES_VERSION=1)
add_subdirectory(ext/live)
set(live555Includes
${live555_SOURCE_DIR}/BasicUsageEnvironment/include
${live555_SOURCE_DIR}/groupsock/include
${live555_SOURCE_DIR}/liveMedia/include
${live555_SOURCE_DIR}/UsageEnvironment/include
)
include_directories($ENV{INCLUDE_PATH})
# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/ffmpegInclude)
include_directories(
${CMAKE_FIND_ROOT_PATH}/include
${CMAKE_CURRENT_SOURCE_DIR}/src
${live555Includes}
)
file(GLOB Souce_files
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvademo.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffmpeg_utils.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvadecoder.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvadisplay.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvafilter.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvarenderer_drm.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvarenderer_egl.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvarenderer_x11.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvarenderer.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvasurface.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvadecoder.c
${CMAKE_CURRENT_SOURCE_DIR}/src/vaapi_utils.c
${CMAKE_CURRENT_SOURCE_DIR}/src/ffvartsp.cpp
)
message(STATUS "os is ${CMAKE_SYSTEM_NAME}")
set(target_name ffvademo)
add_executable(${target_name} ${Souce_files})
# add_library(${target_name} SHARED
# ${Souce_files})
target_link_libraries(${target_name}
# ffvadecoder
va
avformat
avfilter
avcodec
swscale
swresample
avutil
va-x11
X11
EGL
GLESv2
liveMedia
BasicUsageEnvironment
groupsock
UsageEnvironment
ssl
crypto
)
target_compile_definitions(
${target_name}
PRIVATE
)