修复CMakeLists路径问题

This commit is contained in:
HP 2026-06-07 17:06:49 +08:00
parent 3f6e2bab2c
commit 8d8c9ed9d1
1 changed files with 13 additions and 0 deletions

View File

@ -100,6 +100,19 @@ endif()
function(imx6u_configure_app_target target_name)
target_link_libraries(${target_name} PRIVATE imx6u_core)
if(CMAKE_CONFIGURATION_TYPES)
foreach(config ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER "${config}" config_upper)
set_target_properties(${target_name} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_${config_upper} "${CMAKE_BINARY_DIR}/${config}"
)
endforeach()
else()
set_target_properties(${target_name} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
)
endif()
if(WIN32 AND NOT USE_FRAMEBUFFER)
add_custom_command(TARGET ${target_name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different