Commit 1d7d8dfb authored by David Reid's avatar David Reid

Fix some CMake errors with the Emscripten build.

parent f48d9035
...@@ -82,6 +82,20 @@ set(COMPILE_OPTIONS) ...@@ -82,6 +82,20 @@ set(COMPILE_OPTIONS)
set(LIBS_TO_INSTALL) set(LIBS_TO_INSTALL)
# Special rules for Emscripten.
#
# - MINIAUDIO_FORCE_C89 is not supported.
# - MINIAUDIO_NO_RUNTIME_LINKING must be enabled.
if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(MINIAUDIO_FORCE_C89 OFF)
set(MINIAUDIO_NO_RUNTIME_LINKING ON)
# This is a hack to work around some errors relating to generation of the pkg-config file.
set(MINIAUDIO_ENABLE_ONLY_SPECIFIC_BACKENDS ON)
set(MINIAUDIO_ENABLE_WEBAUDIO ON)
endif()
if(MINIAUDIO_FORCE_CXX AND MINIAUDIO_FORCE_C89) if(MINIAUDIO_FORCE_CXX AND MINIAUDIO_FORCE_C89)
message(FATAL_ERROR "MINIAUDIO_FORCE_CXX and MINIAUDIO_FORCE_C89 cannot be enabled at the same time.") message(FATAL_ERROR "MINIAUDIO_FORCE_CXX and MINIAUDIO_FORCE_C89 cannot be enabled at the same time.")
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment