diff --git a/CMakeLists.txt b/CMakeLists.txt index 57a3050..0305e4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,7 +38,9 @@ target_link_libraries(game blah) # copy SDL2 to the build directory set(SDL2_DLL "" CACHE FILEPATH "SDL2 DLL Path") if (SDL2_ENABLED) - add_custom_command( - TARGET game POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${SDL2_DLL} $) + if (EXISTS ${SDL2_DLL}) + add_custom_command( + TARGET game POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${SDL2_DLL} $) + endif() endif() \ No newline at end of file