diff --git a/CMakeLists.txt b/CMakeLists.txt index b4be6f1..bc260be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,11 @@ target_link_libraries(camera_to_rtsp ${CMAKE_SOURCE_DIR}/third_party/lib/libpaho-mqtt3c.a ) +set_target_properties(camera_to_rtsp PROPERTIES + BUILD_RPATH "\$ORIGIN/lib" + INSTALL_RPATH "\$ORIGIN/lib" +) + # 运行时把 config.json 复制到 bin/ 目录 add_custom_command( TARGET camera_to_rtsp POST_BUILD