mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Merge branch 'dev' into dev-0.12
This commit is contained in:
+19
-6
@@ -462,18 +462,28 @@ set(COMMON_LINK_LIBRARIES)
|
|||||||
if (UNIX)
|
if (UNIX)
|
||||||
if(NOT MINIAUDIO_NO_RUNTIME_LINKING)
|
if(NOT MINIAUDIO_NO_RUNTIME_LINKING)
|
||||||
# Not all platforms actually use a separate "dl" library, notably NetBSD and OpenBSD.
|
# Not all platforms actually use a separate "dl" library, notably NetBSD and OpenBSD.
|
||||||
find_library(LIB_DL "dl")
|
find_library(LIB_DL NAMES dl)
|
||||||
if(LIB_DL)
|
if(LIB_DL)
|
||||||
list(APPEND COMMON_LINK_LIBRARIES dl) # For dlopen(), etc. Most compilers will link to this by default, but some may not.
|
list(APPEND COMMON_LINK_LIBRARIES ${LIB_DL}) # For dlopen(), etc. Most compilers will link to this by default, but some may not.
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_library(LIB_PTHREAD NAMES pthread)
|
||||||
|
if(LIB_PTHREAD)
|
||||||
list(APPEND COMMON_LINK_LIBRARIES pthread) # Some compilers will not link to pthread by default so list it here just in case.
|
list(APPEND COMMON_LINK_LIBRARIES pthread) # Some compilers will not link to pthread by default so list it here just in case.
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(LIB_M NAMES m)
|
||||||
|
if(LIB_M)
|
||||||
list(APPEND COMMON_LINK_LIBRARIES m)
|
list(APPEND COMMON_LINK_LIBRARIES m)
|
||||||
|
endif()
|
||||||
|
|
||||||
# If we're compiling for 32-bit ARM we need to link to -latomic.
|
# If we're compiling for 32-bit ARM we need to link to -latomic.
|
||||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
||||||
list(APPEND COMMON_LINK_LIBRARIES atomic)
|
find_library(LIB_ATOMIC NAMES atomic)
|
||||||
|
if(LIB_ATOMIC)
|
||||||
|
list(APPEND COMMON_LINK_LIBRARIES ${LIB_ATOMIC})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -614,14 +624,17 @@ if(MINIAUDIO_BUILD_TESTS)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
# Disable C++ tests when forcing C89. This is needed because we'll be passing -std=c89 which will cause errors when trying to compile a C++ file.
|
||||||
|
if(NOT MINIAUDIO_FORCE_C89)
|
||||||
# The debugging test is only used for debugging miniaudio itself. Don't do add_test() for this, and do not include it in in any automated testing.
|
# The debugging test is only used for debugging miniaudio itself. Don't do add_test() for this, and do not include it in in any automated testing.
|
||||||
add_miniaudio_test(miniaudio_debugging debugging/debugging.cpp)
|
add_miniaudio_test(miniaudio_debugging debugging/debugging.cpp)
|
||||||
|
|
||||||
add_miniaudio_test(miniaudio_deviceio deviceio/deviceio.c)
|
|
||||||
add_test(NAME miniaudio_deviceio COMMAND miniaudio_deviceio --auto)
|
|
||||||
|
|
||||||
add_miniaudio_test(miniaudio_cpp cpp/cpp.cpp)
|
add_miniaudio_test(miniaudio_cpp cpp/cpp.cpp)
|
||||||
add_test(NAME miniaudio_cpp COMMAND miniaudio_cpp --auto) # This is just the deviceio test.
|
add_test(NAME miniaudio_cpp COMMAND miniaudio_cpp --auto) # This is just the deviceio test.
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_miniaudio_test(miniaudio_deviceio deviceio/deviceio.c)
|
||||||
|
add_test(NAME miniaudio_deviceio COMMAND miniaudio_deviceio --auto)
|
||||||
|
|
||||||
add_miniaudio_test(miniaudio_conversion conversion/conversion.c)
|
add_miniaudio_test(miniaudio_conversion conversion/conversion.c)
|
||||||
add_test(NAME miniaudio_conversion COMMAND miniaudio_conversion)
|
add_test(NAME miniaudio_conversion COMMAND miniaudio_conversion)
|
||||||
|
|||||||
Reference in New Issue
Block a user