fix(cpn): declare simulator target before referencing it in wasm-copy step (#7708)
Co-authored-by: Peter Feerick <5500713+pfeerick@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Peter Feerick
Claude Sonnet 5
parent
55583a8ae9
commit
fcd4b8d2e4
@@ -272,19 +272,6 @@ target_link_libraries(${COMPANION_NAME} PRIVATE
|
|||||||
|
|
||||||
PrintTargetReport("${COMPANION_NAME}")
|
PrintTargetReport("${COMPANION_NAME}")
|
||||||
|
|
||||||
# Copy WASM simulator modules next to executables for local dev
|
|
||||||
if(SIMULATOR_WASM_DIR)
|
|
||||||
foreach(_target ${COMPANION_NAME} ${SIMULATOR_NAME})
|
|
||||||
add_custom_command(TARGET ${_target} POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND}
|
|
||||||
-DSRC_DIR=${SIMULATOR_WASM_DIR}
|
|
||||||
-DDST_DIR=$<TARGET_FILE_DIR:${_target}>
|
|
||||||
-P ${CMAKE_SOURCE_DIR}/cmake/CopyWasmModules.cmake
|
|
||||||
COMMENT "Copying WASM simulator modules to ${_target} output"
|
|
||||||
)
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
############# Standalone simulator ###############
|
############# Standalone simulator ###############
|
||||||
|
|
||||||
set(simu_SRCS simulator.cpp )
|
set(simu_SRCS simulator.cpp )
|
||||||
@@ -299,6 +286,19 @@ target_link_libraries(${SIMULATOR_NAME} PRIVATE
|
|||||||
${SDL2_LIBRARIES}
|
${SDL2_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Copy WASM simulator modules next to executables for local dev
|
||||||
|
if(SIMULATOR_WASM_DIR)
|
||||||
|
foreach(_target ${COMPANION_NAME} ${SIMULATOR_NAME})
|
||||||
|
add_custom_command(TARGET ${_target} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
-DSRC_DIR=${SIMULATOR_WASM_DIR}
|
||||||
|
-DDST_DIR=$<TARGET_FILE_DIR:${_target}>
|
||||||
|
-P ${CMAKE_SOURCE_DIR}/cmake/CopyWasmModules.cmake
|
||||||
|
COMMENT "Copying WASM simulator modules to ${_target} output"
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
|
|
||||||
############# Install ####################
|
############# Install ####################
|
||||||
|
|||||||
Reference in New Issue
Block a user