Description
When building on Windows, the program compiles successfully but fails to run due to missing glew32d.dll / glew32.dll.
Cause
CMake does not copy the GLEW/GLFW runtime DLLs to the output directory.
Fix
Adding this snippet at the end of CMakeLists.txt resolves the issue:
if (WIN32)
add_custom_command(TARGET BlackHole3D POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_RUNTIME_DLLS:BlackHole3D> $<TARGET_FILE_DIR:BlackHole3D>
COMMAND_EXPAND_LISTS
)
endif()
Once the snippet is added, follow the README instrucctions as well
Description
When building on Windows, the program compiles successfully but fails to run due to missing
glew32d.dll/glew32.dll.Cause
CMake does not copy the GLEW/GLFW runtime DLLs to the output directory.
Fix
Adding this snippet at the end of
CMakeLists.txtresolves the issue:Once the snippet is added, follow the README instrucctions as well