Skip to content

Commit

Permalink
Used prebuilt OpenAL library for Windows build because MinGW lacks mu…
Browse files Browse the repository at this point in the history
…tex support needed to compile OpenAL.
  • Loading branch information
RICCIARDI-Adrien committed May 17, 2020
1 parent 80c4f39 commit 6d9310d
Show file tree
Hide file tree
Showing 241 changed files with 269 additions and 67,779 deletions.
24 changes: 3 additions & 21 deletions CMakeLists.txt
Expand Up @@ -300,33 +300,15 @@ if(MINGW AND CMAKE_CROSSCOMPILING)
${CMAKE_CURRENT_SOURCE_DIR}/extern/sdl2/i686-w64-mingw32/lib/libSDL2.dll.a
)

set(OPENAL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/openal/include/AL")
set(OPENAL_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/extern/openal/libs/Win32/OpenAL32.lib)

set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
else()
find_package(OpenAL REQUIRED)
find_package(SDL2 REQUIRED)
endif()

# Detect system OpenAL (SDL2 must be already defined)

if (FORCE_SYSTEM_OPENAL)
find_package(OpenAL QUIET)
if (NOT OPENAL_FOUND)
message("System-provided OpenAL not found. Enabling internal OpenAL support.")
set(OPENTOMB_INTERNAL_OPENAL ON)
else()
set(OPENTOMB_INTERNAL_OPENAL OFF)
endif ()
else ()
set(OPENTOMB_INTERNAL_OPENAL ON)
endif ()

if (OPENTOMB_INTERNAL_OPENAL)
add_subdirectory(extern/openal)
set(OPENAL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/extern/openal/include/AL")
set(OPENAL_LIBRARY OpenAL32)
endif ()
find_package(OpenAL REQUIRED)

set(OPENTOMB_ICON "resource/icon/opentomb.rc")

# Check for optional OpenAL include files that are not present in all implementations of the library
Expand Down
5 changes: 0 additions & 5 deletions extern/openal/.gitignore

This file was deleted.

68 changes: 0 additions & 68 deletions extern/openal/.travis.yml

This file was deleted.

30 changes: 0 additions & 30 deletions extern/openal/BSD-3Clause

This file was deleted.

0 comments on commit 6d9310d

Please sign in to comment.