diff --git a/CMakeLists.txt b/CMakeLists.txt index 7eb9f54..d81b87d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,5 @@ target_link_libraries(camera_to_rtsp # 运行时把 config.json 复制到 bin/ 目录 add_custom_command(TARGET camera_to_rtsp POST_BUILD - COMMAND /bin/bash -c "if [ ! -f '$/config.json' ]; then cp '${CMAKE_SOURCE_DIR}/config.json' '$/config.json'; else echo 'config.json exists, skip copy'; fi" + COMMAND /bin/bash -c "if [ ! -f \"$/config.json\" ]; then cp \"${CMAKE_SOURCE_DIR}/config.json\" \"$/config.json\"; else echo 'config.json exists, skip copy'; fi" ) - -