Fix "no remove aqua speed" bug when player leaves the water
[ryzomcore.git] / nel / src / sound / driver / openal / CMakeLists.txt
blob9437dee826a6af11c9bd120e5a1370b881c44c87
1 FILE(GLOB SRC *.cpp *.h *.def *.rc)
3 IF(WIN32)
4   SET(NLDRV_AL_LIB "nel_drv_openal_win")
5 ELSE()
6   SET(NLDRV_AL_LIB "nel_drv_openal")
7 ENDIF()
9 SOURCE_GROUP(efx FILES
10         effect_al.cpp
11         effect_al.h)
13 SOURCE_GROUP(sfx FILES
14         buffer_al.cpp
15         buffer_al.h
16         listener_al.cpp
17         listener_al.h
18         music_channel_al.cpp
19         music_channel_al.h
20         source_al.cpp
21         source_al.h)
23 SOURCE_GROUP(util FILES
24         ext_al.cpp
25         ext_al.h)
27 NL_TARGET_DRIVER(${NLDRV_AL_LIB} ${SRC})
29 IF(HUNTER_ENABLED)
30   HUNTER_ADD_PACKAGE(OpenAL)
31   FIND_PACKAGE(OpenAL CONFIG REQUIRED)
32   SET(OPENAL_LIBRARY OpenAL::OpenAL)
33   ADD_DEFINITIONS(-DAL_LIBTYPE_STATIC)
34 ELSE()
35   INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
36 ENDIF()# hunter
38 TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} nelmisc nelsnd_lowlevel ${OPENAL_LIBRARY})
39 NL_DEFAULT_PROPS(${NLDRV_AL_LIB} "NeL, Driver, Sound: OpenAL")
40 NL_ADD_RUNTIME_FLAGS(${NLDRV_AL_LIB})
41 NL_ADD_LIB_SUFFIX(${NLDRV_AL_LIB})
43 IF(WIN32)
44   # Find and include EFX-Util on Windows.
45   FIND_PACKAGE(EFXUtil)
46   IF(EFXUTIL_FOUND)
47     INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
48     TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${EFXUTIL_LIBRARY})
49     ADD_DEFINITIONS(-DEFX_CREATIVE_AVAILABLE=1)
50   ENDIF()
51 ENDIF()
53 IF(WITH_PCH)
54   ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_AL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp)
55 ENDIF()
57 IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
58   INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound)
59   IF(WITH_MAXPLUGIN)
60     INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION maxplugin COMPONENT driverssound)
61   ENDIF()
62 ENDIF()