This commit is contained in:
cxh 2025-11-20 09:36:12 +08:00
parent 910a2d62ba
commit bb427430b7
2 changed files with 4 additions and 5 deletions

View File

@ -51,9 +51,8 @@ target_link_libraries(camera_to_rtsp
# config.json bin/
add_custom_command(
TARGET camera_to_rtsp POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo "Checking config.json..."
COMMAND ${CMAKE_COMMAND} -E test -f $<TARGET_FILE_DIR:camera_to_rtsp>/config.json
|| ${CMAKE_COMMAND} -E copy
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_SOURCE_DIR}/config.json
$<TARGET_FILE_DIR:camera_to_rtsp>/config.json
$<TARGET_FILE_DIR:camera_to_rtsp>/config.json.default
)