1 FILE(GLOB SRC *.cpp *.h *.def *.rc)
4 SET(NLDRV_AL_LIB "nel_drv_openal_win")
6 SET(NLDRV_AL_LIB "nel_drv_openal")
13 SOURCE_GROUP(sfx FILES
23 SOURCE_GROUP(util FILES
27 NL_TARGET_DRIVER(${NLDRV_AL_LIB} ${SRC})
30 HUNTER_ADD_PACKAGE(OpenAL)
31 FIND_PACKAGE(OpenAL CONFIG REQUIRED)
32 SET(OPENAL_LIBRARY OpenAL::OpenAL)
33 ADD_DEFINITIONS(-DAL_LIBTYPE_STATIC)
35 INCLUDE_DIRECTORIES(${OPENAL_INCLUDE_DIR})
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})
44 # Find and include EFX-Util on Windows.
47 INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
48 TARGET_LINK_LIBRARIES(${NLDRV_AL_LIB} ${EFXUTIL_LIBRARY})
49 ADD_DEFINITIONS(-DEFX_CREATIVE_AVAILABLE=1)
54 ADD_NATIVE_PRECOMPILED_HEADER(${NLDRV_AL_LIB} ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.h ${CMAKE_CURRENT_SOURCE_DIR}/stdopenal.cpp)
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)
60 INSTALL(TARGETS ${NLDRV_AL_LIB} RUNTIME DESTINATION maxplugin COMPONENT driverssound)