Skip to content

Commit

Permalink
Add some custom sfml command for OpenAL
Browse files Browse the repository at this point in the history
  • Loading branch information
JustDoom committed Oct 19, 2024
1 parent 6a3436a commit 648bd3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:main>
VERBATIM)

if (BUILD_SHARED_LIBS)
add_custom_command(TARGET 8ChocChip POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
Expand Down

0 comments on commit 648bd3b

Please sign in to comment.