-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (33 loc) · 1.33 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
# cmake_minimum_required(VERSION 3.10)
# project(Basic)
# set(CMAKE_CXX_STANDARD 14)
# include_directories(/home/xuejun/anaconda3/include/gstreamer-1.0
# /home/xuejun/anaconda3/include/glib-2.0/
# /home/xuejun/anaconda3/lib/glib-2.0/include/)
# link_directories(/home/xuejun/anaconda3/lib/gstreamer-1.0)
# #include_directories(/home/xuejun/anaconda3/include/glib-2.0/glib.h)
# add_executable(Basic
# basic_1.cpp)
cmake_minimum_required(VERSION 3.10)
project(gstreamer_01) #Project name
set(CMAKE_CXX_STANDARD 11) #setting C++ 11 standard
find_package(PkgConfig) #finding pkg-config is a helper tool
#using pkg-config to getting Gstreamer
pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
#including GStreamer header files directory
include_directories(
${GLIB_INCLUDE_DIRS}
${GSTREAMER_INCLUDE_DIRS}
)
message("include path is"${GLIB_INCLUDE_DIRS}, ${GSTREAMER_INCLUDE_DIRS})
#linking GStreamer library directory
link_directories(
${GLIB_LIBRARY_DIRS}
${GSTREAMER_LIBRARY_DIRS}
)
# message("link path is"${GLIB_LIBRARY_DIRS},${GSTREAMER_LIBRARY_DIRS})
message("library path is "${GSTREAMER_LIBRARIES})
#building target executable
add_executable(${PROJECT_NAME} 03_dynamic_pipline.cpp)
#linking Gstreamer library with target executable
target_link_libraries(${PROJECT_NAME} ${GSTREAMER_LIBRARIES})