mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-24 07:43:44 +02:00

OpenAL Soft 1.24 introduces a lot of code that doesn't work well with the PlayStation 3 homebrew toolchain, and also the old version of the Wii U homebrew toolchain currently used by the libretro buildbot. Instead of maintaining a bunch of patches to get 1.24 to work on these toolchains, I think it'd be easier to just use 1.23.
16 lines
735 B
Diff
16 lines
735 B
Diff
# Stops OpenAL Soft's build system from unconditionally enabling the `-pthread` compiler flag when targeting Emscripten because it causes problems if the rest of mkxp-z isn't also building with pthread support.
|
|
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -558,7 +558,10 @@ if(NOT WIN32)
|
|
message(FATAL_ERROR "PThreads is required for non-Windows builds!")
|
|
endif()
|
|
|
|
- check_c_compiler_flag(-pthread HAVE_PTHREAD)
|
|
+ string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_LOWER)
|
|
+ if(NOT SYSTEM_LOWER STREQUAL "emscripten")
|
|
+ check_c_compiler_flag(-pthread HAVE_PTHREAD)
|
|
+ endif()
|
|
if(HAVE_PTHREAD)
|
|
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -pthread")
|
|
set(C_FLAGS ${C_FLAGS} -pthread)
|