Support build with OpenAL-Soft on Windows

This commit is contained in:
kaetemi 2019-05-01 10:17:44 +08:00
parent 1c422390e7
commit a249fcbab3
2 changed files with 11 additions and 8 deletions

View file

@ -36,8 +36,11 @@ NL_ADD_LIB_SUFFIX(${NLDRV_AL_LIB})
IF(WIN32) IF(WIN32)
# Find and include EFX-Util on Windows. # Find and include EFX-Util on Windows.
FIND_PACKAGE(EFXUtil) FIND_PACKAGE(EFXUtil)
IF(EFXUTIL_FOUND)
INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${EFXUTIL_LIBRARY}) TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${EFXUTIL_LIBRARY})
ADD_DEFINITIONS(-DEFX_CREATIVE_AVAILABLE=1)
ENDIF()
ENDIF() ENDIF()
IF(WITH_PCH) IF(WITH_PCH)

View file

@ -17,12 +17,12 @@
#ifndef NL_EXT_AL_H #ifndef NL_EXT_AL_H
#define NL_EXT_AL_H #define NL_EXT_AL_H
#ifdef NL_OS_WINDOWS #ifndef EFX_CREATIVE_AVAILABLE
# define EFX_CREATIVE_AVAILABLE 1 #define EFX_CREATIVE_AVAILABLE 0
# define EAX_AVAILABLE 0 #endif
#else
# define EFX_CREATIVE_AVAILABLE 0 #ifndef EAX_AVAILABLE
# define EAX_AVAILABLE 0 #define EAX_AVAILABLE 0
#endif #endif
#if EAX_AVAILABLE #if EAX_AVAILABLE