This commit is contained in:
cxh 2025-11-20 09:21:54 +08:00
parent 4a9c373c05
commit 89aef13800

View File

@ -50,7 +50,10 @@ target_link_libraries(camera_to_rtsp
# config.json bin/ # config.json bin/
add_custom_command(TARGET camera_to_rtsp POST_BUILD add_custom_command(TARGET camera_to_rtsp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different COMMAND ${CMAKE_COMMAND} -E echo "Checking config.json..."
${CMAKE_SOURCE_DIR}/config.json COMMAND ${CMAKE_COMMAND} -E test -e $<TARGET_FILE_DIR:camera_to_rtsp>/config.json
$<TARGET_FILE_DIR:camera_to_rtsp>/config.json || ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/config.json
$<TARGET_FILE_DIR:camera_to_rtsp>/config.json
) )