Skip to content

Commit 541975d

Browse files
committed
update patches
1 parent c3f1322 commit 541975d

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,13 @@ check_include_file(guiddef.h HAVE_GUIDDEF_H)
508508

509509
# Some systems need libm for some math functions to work
510510
set(MATH_LIB )
511+
if(NOT MINGW)
511512
check_library_exists(m pow "" HAVE_LIBM)
512513
if(HAVE_LIBM)
513514
set(MATH_LIB ${MATH_LIB} m)
514515
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} m)
515516
endif()
517+
endif()
516518

517519
# Some systems need to link with -lrt for clock_gettime as used by the common
518520
# eaxmple functions.
@@ -1321,7 +1323,7 @@ if(ALSOFT_UTILS OR ALSOFT_EXAMPLES)
13211323
endif()
13221324
endif()
13231325

1324-
if(NOT WIN32)
1326+
if(NOT MSVC)
13251327
set(LIBNAME "openal")
13261328
else()
13271329
set(LIBNAME "OpenAL32")
@@ -1458,7 +1460,10 @@ else()
14581460
add_library(${IMPL_TARGET} SHARED ${OPENAL_OBJS} ${ALC_OBJS} ${CORE_OBJS} ${RC_CONFIG}
14591461
${TARGET_PUBLIC_HEADERS})
14601462
if(WIN32)
1461-
set_target_properties(${IMPL_TARGET} PROPERTIES PREFIX "")
1463+
set_target_properties(${IMPL_TARGET} PROPERTIES
1464+
OUTPUT_NAME openal
1465+
RUNTIME_OUTPUT_NAME openal-${LIB_MAJOR_VERSION}
1466+
ARCHIVE_OUTPUT_NAME openal)
14621467
endif()
14631468
target_link_libraries(${IMPL_TARGET} PRIVATE alsoft.common ${LINKER_FLAGS} ${EXTRA_LIBS}
14641469
${MATH_LIB} alsoft::fmt)

alc/backends/portaudio.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,11 @@ bool PortBackendFactory::init()
429429
if(!pa_handle)
430430
{
431431
#ifdef _WIN32
432+
#if defined(__MINGW32__)
433+
# define PALIB "libportaudio-2.dll"
434+
#else
432435
# define PALIB "portaudio.dll"
436+
#endif
433437
#elif defined(__APPLE__) && defined(__MACH__)
434438
# define PALIB "libportaudio.2.dylib"
435439
#elif defined(__OpenBSD__)

cmake/FindMySOFA.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ find_library(MYSOFA_LIBRARY NAMES mysofa
4949
DOC "The MySOFA library"
5050
)
5151

52+
if(NOT MINGW)
5253
find_library(MYSOFA_M_LIBRARY NAMES m
5354
DOC "The math library for MySOFA"
5455
)
56+
endif()
5557

5658
# handle the QUIETLY and REQUIRED arguments and set MYSOFA_FOUND to TRUE if
5759
# all listed variables are TRUE

openal.pc.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Version: @PACKAGE_VERSION@
1010
Libs: -L${libdir} -l@LIBNAME@ @PKG_CONFIG_LIBS@
1111
Libs.private:@PKG_CONFIG_PRIVATE_LIBS@
1212
Cflags: -I${includedir} -I${includedir}/AL @PKG_CONFIG_CFLAGS@
13+
Cflags.private: -DAL_LIBTYPE_STATIC

0 commit comments

Comments
 (0)