Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / src / sound / driver / openal / CMakeLists.txt
blob22b3f434871eb2c8999e161b48559bcb3ecf2b34
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 INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
31 TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${OPENAL_LIBRARY} nelmisc nelsnd_lowlevel)
32 NL_DEFAULT_PROPS(${NLDRV_AL_LIB} "NeL, Driver, Sound: OpenAL")
33 NL_ADD_RUNTIME_FLAGS(${NLDRV_AL_LIB})
34 NL_ADD_LIB_SUFFIX(${NLDRV_AL_LIB})
36 IF(WIN32)
37   # Find and include EFX-Util on Windows.
38   FIND_PACKAGE(EFXUtil)
39   IF(EFXUTIL_FOUND)
40     INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
41     TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${EFXUTIL_LIBRARY})
42     ADD_DEFINITIONS(-DEFX_CREATIVE_AVAILABLE=1)
43   ENDIF()
44 ENDIF()
46 IF(WITH_PCH)
47   ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_AL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp)
48 ENDIF()
50 IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC_DRIVERS) OR NOT WITH_STATIC_DRIVERS)
51   INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION ${NL_DRIVER_PREFIX} LIBRARY DESTINATION ${NL_DRIVER_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT driverssound)
52   IF(WITH_MAXPLUGIN)
53     INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION maxplugin COMPONENT driverssound)
54   ENDIF()
55 ENDIF()