1、一个CMkaeLists.txt
cmake_minimum_required(VERSION 3.0)
project(test_project)
find_package(PkgConfig REQUIRED)
pkg_search_module(GST1 REQUIRED gstreamer-1.0)//查找到gstreamer-1.0 并用GST1代表,GST1自己定义
add_executable(mytest 1.c)
target_include_directories(mytest PRIVATE ${GST1_INCLUDE_DIRS})
target_link_libraries(mytest ${GST1_LIBRARIES})
message("GST1_LIBRARIES
${GST1_LIBRARIES}
")```