Created
January 7, 2026 23:17
-
-
Save jniemann66/969639005c85dcc4aed9c0d65f838f36 to your computer and use it in GitHub Desktop.
cmake: windows copy-dlls post build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cmake >= 3.21 | |
| if(WIN32) | |
| add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD | |
| COMMAND ${CMAKE_COMMAND} -E copy_if_different | |
| $<TARGET_RUNTIME_DLLS:${PROJECT_NAME}> | |
| $<TARGET_FILE_DIR:${PROJECT_NAME}> | |
| COMMAND_EXPAND_LISTS | |
| ) | |
| endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment