1
General / Re: Compiling example with cmake
« on: October 13, 2023, 09:27:11 am »
Here is my copying dll
if (WIN32)
file(GLOB sfml_dlls ${SFML_DIR}/../../../bin/*.dll)
foreach( file_i ${sfml_dlls})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${file_i}
$<TARGET_FILE_DIR:${PROJECT_NAME}>
)
endforeach( file_i )
endif(WIN32)
file(GLOB sfml_dlls ${SFML_DIR}/../../../bin/*.dll)
foreach( file_i ${sfml_dlls})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${file_i}
$<TARGET_FILE_DIR:${PROJECT_NAME}>
)
endforeach( file_i )
endif(WIN32)