Skip to content

Commit 90df8ff

Browse files
committed
fix demo config paths handling
Signed-off-by: Gwenn Le Bihan <[email protected]>
1 parent 4f4cc73 commit 90df8ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ endif(BUILD_PYTHON_INTERFACE)
146146
macro(create_demo source)
147147

148148
set(demo_name ${PROJECT_NAME}_${source})
149-
set(DEMO_ROOT "${PROJECT_SOURCE_DIR}/demos")
149+
set(device string(REPLACE "demo_" "" ${source}))
150+
set(DEMO_ROOT "${CMAKE_INSTALL_PREFIX}/demos")
151+
file(COPY "${PROJECT_SOURCE_DIR}/demos/config_${device}.yaml" "${DEMO_ROOT}/config_${device}.yaml")
150152
add_executable(${demo_name} demos/${source}.cpp)
151153
target_link_libraries(${demo_name} ${PROJECT_NAME})
152154
target_compile_definitions(

0 commit comments

Comments
 (0)