-
Notifications
You must be signed in to change notification settings - Fork 18
/
CMakeLists.txt
55 lines (45 loc) · 1.4 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
cmake_minimum_required(VERSION 3.1)
project(fpvue VERSION 0.12)
set(CMAKE_CXX_STANDARD 17)
add_compile_options("-Wno-address-of-packed-member")
set(SOURCE_FILES
drm.h
drm.c
osd.h
osd.c
rtp.h
rtp.c
mavlink.h
mavlink.c
main.cpp
main.h
scheduling_helper.hpp
gstrtpreceiver.cpp
gstrtpreceiver.h)
include_directories("/usr/include/libdrm" "/usr/include/cairo")
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} rockchip_mpp pthread drm m cairo)
# Embed gstreamer
find_package(PkgConfig REQUIRED)
pkg_search_module(GST REQUIRED
gstreamer-1.0>=1.4
gstreamer-app-1.0>=1.4
)
pkg_search_module(gstreamer REQUIRED IMPORTED_TARGET gstreamer-1.0>=1.4)
pkg_search_module(gstreamer-app REQUIRED IMPORTED_TARGET gstreamer-app-1.0>=1.4)
target_link_libraries(${PROJECT_NAME} PkgConfig::gstreamer PkgConfig::gstreamer-app)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(
CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -Werror -fsanitize=undefined -fsanitize=address"
)
target_link_options(${PROJECT_NAME}
BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address
)
endif()
configure_file(fpvue_config.h.in fpvue_config.h)
target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_BINARY_DIR}")
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)