mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Try fixing a compilation error when pthread does not exist.
This commit is contained in:
+9
-2
@@ -458,8 +458,15 @@ if (UNIX)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND COMMON_LINK_LIBRARIES pthread) # Some compilers will not link to pthread by default so list it here just in case.
|
find_library(LIB_PTHREAD NAMES pthread)
|
||||||
list(APPEND COMMON_LINK_LIBRARIES m)
|
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.
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_library(LIB_M NAMES m)
|
||||||
|
if(LIB_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")
|
||||||
|
|||||||
Reference in New Issue
Block a user