From 648bd3b631f838dff520b021b72aea9a76652b97 Mon Sep 17 00:00:00 2001 From: doom <61824552+JustDoom@users.noreply.github.com> Date: Sat, 19 Oct 2024 16:01:00 +1000 Subject: [PATCH] Add some custom sfml command for OpenAL --- src/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5ef785f..57162d7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,6 +21,12 @@ set_target_properties(8ChocChip PROPERTIES # Copy DLLs needed for runtime on Windows if(WIN32) + add_custom_command( + TARGET main + COMMENT "Copy OpenAL DLL" + PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$,x64,x86>/openal32.dll $ + VERBATIM) + if (BUILD_SHARED_LIBS) add_custom_command(TARGET 8ChocChip POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different