c++ - CMakeLists issue with shared libraries -


i trying use gstreamer-rtsp-server way:

  1. i downloaded gst-rtsp-server source , compiled , installed using ./configure, make, make install usual.
  2. after create simple clion project code gstreamer-rtsp-server sample(gst-rtsp-server-1.6.0/examples/test-launch.c)
  3. cmakelists looks this:

    cmake_minimum_required(version 3.3) project(gst_rtsp_server) set(cmake_cxx_flags "${cmake_cxx_flags} -std=c++11") include(findpkgconfig) pkg_check_modules(glib glib-2.0 required)  pkg_check_modules(gstreamer     required gstreamer-1.0)  pkg_check_modules(gstrtsp     gstreamer-rtsp-server-1.0) include_directories(${glib_include_dirs}) include_directories(${gstreamer_include_dirs}) include_directories(${gstrtsp_include_dirs}) set(source_files main.cpp)  add_executable(gst_rtsp_server ${source_files})  target_link_libraries(${project_name} ${glib_libraries})  target_link_libraries(${project_name} ${gstreamer_libraries})  target_link_libraries(${project_name} gstvideo-1.0) target_link_libraries(${project_name} ${gstrtsp_libraries}) 

after built project when run output:

error while loading shared libraries: libgstrtspserver-1.0.so.0: cannot open shared object file: no such file or directory 

how can fix , run project?


Comments