Add experimental device attributes for apps to query
[openal-soft.git] / CMakeLists.txt
blobeb17a808fe5d936bfcc95e74a25f7a68100aec72
1 # CMake build file list for OpenAL
3 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
5 IF(COMMAND CMAKE_POLICY)
6   CMAKE_POLICY(SET CMP0003 NEW)
7 ENDIF(COMMAND CMAKE_POLICY)
9 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
11 INCLUDE(CheckFunctionExists)
12 INCLUDE(CheckLibraryExists)
13 INCLUDE(CheckSharedLibraryExists)
14 INCLUDE(CheckIncludeFile)
15 INCLUDE(CheckIncludeFiles)
16 INCLUDE(CheckSymbolExists)
17 INCLUDE(CheckCCompilerFlag)
18 INCLUDE(CheckCSourceCompiles)
19 INCLUDE(CheckTypeSize)
22 PROJECT(OpenAL C)
25 SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
28 OPTION(ALSA    "Check for ALSA backend"                ON)
29 OPTION(OSS     "Check for OSS backend"                 ON)
30 OPTION(SOLARIS "Check for Solaris backend"             ON)
31 OPTION(DSOUND  "Check for DirectSound backend"         ON)
32 OPTION(WINMM   "Check for Windows Multimedia backend"  ON)
33 OPTION(PORTAUDIO  "Check for PortAudio backend"        ON)
34 OPTION(PULSEAUDIO "Check for PulseAudio backend"       ON)
35 OPTION(WAVE    "Enable Wave Writer backend"            ON)
37 OPTION(DLOPEN  "Check for the dlopen API for loading optional libs"  ON)
39 OPTION(WERROR  "Treat compile warnings as errors"      OFF)
41 OPTION(UTILS  "Build and install utility programs"  ON)
43 OPTION(ALSOFT_CONFIG "Install alsoft.conf configuration file" OFF)
46 IF(WIN32)
47     SET(LIBNAME OpenAL32)
48     ADD_DEFINITIONS("-D_WIN32")
49 ELSE()
50     SET(LIBNAME openal)
51 ENDIF()
53 SET(LIB_MAJOR_VERSION "1")
54 SET(LIB_MINOR_VERSION "12")
55 SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}")
58 CHECK_TYPE_SIZE("long" SIZEOF_LONG)
59 CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
60 CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT)
61 CHECK_TYPE_SIZE("void*" SIZEOF_VOIDP)
64 # Add definitions, compiler switches, etc.
65 INCLUDE_DIRECTORIES(OpenAL32/Include include "${OpenAL_BINARY_DIR}")
67 IF(NOT CMAKE_BUILD_TYPE)
68     SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
69         "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
70         FORCE)
71 ENDIF()
72 IF(NOT CMAKE_DEBUG_POSTFIX)
73     SET(CMAKE_DEBUG_POSTFIX "" CACHE STRING
74         "Library postfix for debug builds. Normally left blank."
75         FORCE)
76 ENDIF()
78 IF(MSVC)
79     # ???
80     SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -D_DEBUG")
81     SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG")
82     SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
83     SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
84     ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
85     ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
87     IF(NOT DXSDK_DIR)
88         STRING(REGEX REPLACE "\\\\" "/" DXSDK_DIR "$ENV{DXSDK_DIR}")
89     ELSE()
90         STRING(REGEX REPLACE "\\\\" "/" DXSDK_DIR "${DXSDK_DIR}")
91     ENDIF()
92     IF(DXSDK_DIR)
93         MESSAGE(STATUS "Using DirectX SDK directory: ${DXSDK_DIR}")
94         SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} "${DXSDK_DIR}/Include")
95         INCLUDE_DIRECTORIES("${DXSDK_DIR}/Include")
96         LINK_DIRECTORIES("${DXSDK_DIR}/Lib")
97     ENDIF()
98 ELSE()
99     ADD_DEFINITIONS(-Wall)
100     CHECK_C_COMPILER_FLAG(-Wextra HAVE_W_EXTRA)
101     IF(HAVE_W_EXTRA)
102         ADD_DEFINITIONS(-Wextra)
103     ENDIF()
105     IF(WERROR)
106         ADD_DEFINITIONS(-Werror)
107     ENDIF()
109     SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O2 -funroll-loops -D_DEBUG" CACHE STRING
110         "Flags used by the compiler during Release with Debug Info builds."
111         FORCE)
112     SET(CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" CACHE STRING
113         "Flags used by the compiler during release minsize builds."
114         FORCE)
115     SET(CMAKE_C_FLAGS_RELEASE "-O2 -funroll-loops -fomit-frame-pointer -DNDEBUG" CACHE STRING
116         "Flags used by the compiler during release builds"
117         FORCE)
118     SET(CMAKE_C_FLAGS_DEBUG "-g3 -D_DEBUG" CACHE STRING
119         "Flags used by the compiler during debug builds."
120         FORCE)
122     # Set visibility options if available
123     IF(NOT WIN32)
124         CHECK_C_SOURCE_COMPILES("int foo() __attribute__((destructor));
125                                  int main() {return 0;}" HAVE_GCC_DESTRUCTOR)
127         CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAVE_VISIBILITY_SWITCH)
128         IF(HAVE_VISIBILITY_SWITCH)
129             CHECK_C_SOURCE_COMPILES("int foo() __attribute__((visibility(\"default\")));
130                                      int main() {return 0;}" HAVE_GCC_VISIBILITY)
131             IF(HAVE_GCC_VISIBILITY)
132                 ADD_DEFINITIONS(-fvisibility=hidden -DHAVE_GCC_VISIBILITY)
133             ENDIF()
134         ENDIF()
135     ENDIF()
136 ENDIF()
138 CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));
139                          int main() {return 0;}" HAVE_GCC_FORMAT)
141 CHECK_INCLUDE_FILE(fenv.h HAVE_FENV_H)
142 CHECK_INCLUDE_FILE(float.h HAVE_FLOAT_H)
144 CHECK_LIBRARY_EXISTS(m  powf   "" HAVE_POWF)
145 CHECK_LIBRARY_EXISTS(m  sqrtf  "" HAVE_SQRTF)
146 CHECK_LIBRARY_EXISTS(m  acosf  "" HAVE_ACOSF)
147 CHECK_LIBRARY_EXISTS(m  atanf  "" HAVE_ATANF)
148 CHECK_LIBRARY_EXISTS(m  fabsf  "" HAVE_FABSF)
149 IF(HAVE_FENV_H)
150     CHECK_LIBRARY_EXISTS(m  fesetround  "" HAVE_FESETROUND)
151 ENDIF()
152 IF(HAVE_SQRTF OR HAVE_ACOSF OR HAVE_ATANF OR HAVE_FABSF OR HAVE_FESETROUND)
153     SET(EXTRA_LIBS m ${EXTRA_LIBS})
154 ENDIF()
155 CHECK_FUNCTION_EXISTS(strtof HAVE_STRTOF)
156 CHECK_FUNCTION_EXISTS(_controlfp HAVE__CONTROLFP)
158 CHECK_FUNCTION_EXISTS(stat HAVE_STAT)
159 CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
160 IF(NOT HAVE_STRCASECMP)
161     CHECK_FUNCTION_EXISTS(_stricmp HAVE__STRICMP)
162     IF(NOT HAVE__STRICMP)
163         MESSAGE(FATAL_ERROR "No case-insensitive compare function found, please report!")
164     ENDIF()
166     ADD_DEFINITIONS(-Dstrcasecmp=_stricmp)
167 ENDIF()
169 CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
170 IF(NOT HAVE_STRNCASECMP)
171     CHECK_FUNCTION_EXISTS(_strnicmp HAVE__STRNICMP)
172     IF(NOT HAVE__STRNICMP)
173         MESSAGE(FATAL_ERROR "No case-insensitive size-limitted compare function found, please report!")
174     ENDIF()
176     ADD_DEFINITIONS(-Dstrncasecmp=_strnicmp)
177 ENDIF()
179 CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
180 IF(NOT HAVE_SNPRINTF)
181     CHECK_FUNCTION_EXISTS(_snprintf HAVE__SNPRINTF)
182     IF(NOT HAVE__SNPRINTF)
183         MESSAGE(FATAL_ERROR "No snprintf function found, please report!")
184     ENDIF()
186     ADD_DEFINITIONS(-Dsnprintf=_snprintf)
187 ENDIF()
189 CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
190 IF(NOT HAVE_VSNPRINTF)
191     CHECK_FUNCTION_EXISTS(_vsnprintf HAVE__VSNPRINTF)
192     IF(NOT HAVE__VSNPRINTF)
193         MESSAGE(FATAL_ERROR "No vsnprintf function found, please report!")
194     ENDIF()
196     ADD_DEFINITIONS(-Dvsnprintf=_vsnprintf)
197 ENDIF()
199 CHECK_SYMBOL_EXISTS(isnan math.h HAVE_ISNAN)
200 IF(NOT HAVE_ISNAN)
201     CHECK_FUNCTION_EXISTS(_isnan HAVE__ISNAN)
202     IF(NOT HAVE__ISNAN)
203         MESSAGE(FATAL_ERROR "No isnan function found, please report!")
204     ENDIF()
206     ADD_DEFINITIONS(-Disnan=_isnan)
207 ENDIF()
210 # Check for the dlopen API (for dynamicly loading backend libs)
211 IF(DLOPEN)
212     CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
213     IF(HAVE_DLFCN_H)
214         CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
215         IF(HAVE_LIBDL)
216             SET(EXTRA_LIBS dl ${EXTRA_LIBS})
217         ENDIF()
218     ENDIF()
219 ENDIF()
221 # Check if we have Windows headers
222 CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H -D_WIN32_WINNT=0x0500)
223 IF(NOT HAVE_WINDOWS_H)
224     CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
225     IF(NOT HAVE_GETTIMEOFDAY)
226         MESSAGE(FATAL_ERROR "No timing function found!")
227     ENDIF()
229     CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
230     IF(NOT HAVE_NANOSLEEP)
231         MESSAGE(FATAL_ERROR "No sleep function found!")
232     ENDIF()
234     CHECK_C_COMPILER_FLAG(-pthread HAVE_PTHREAD)
235     IF(HAVE_PTHREAD)
236         ADD_DEFINITIONS(-pthread)
237         SET(EXTRA_LIBS ${EXTRA_LIBS} -pthread)
238     ENDIF()
240     # We need pthreads outside of Windows
241     CHECK_INCLUDE_FILE(pthread.h HAVE_PTHREAD_H)
242     IF(NOT HAVE_PTHREAD_H)
243         MESSAGE(FATAL_ERROR "PThreads is required for non-Windows builds!")
244     ENDIF()
245     # Some systems need pthread_np.h to get recursive mutexes
246     CHECK_INCLUDE_FILES("pthread.h;pthread_np.h" HAVE_PTHREAD_NP_H)
248     # _GNU_SOURCE is needed on some systems for extra attributes, and
249     # _REENTRANT is needed for libc thread-safety
250     ADD_DEFINITIONS(-D_GNU_SOURCE=1)
251     CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_LIBPTHREAD)
252     IF(HAVE_LIBPTHREAD)
253         SET(EXTRA_LIBS pthread ${EXTRA_LIBS})
254     ENDIF()
256     CHECK_LIBRARY_EXISTS(pthread pthread_setschedparam "" HAVE_PTHREAD_SETSCHEDPARAM)
258     CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_LIBRT)
259     IF(HAVE_LIBRT)
260         SET(EXTRA_LIBS rt ${EXTRA_LIBS})
261     ENDIF()
262 ENDIF()
264 # Check for a 64-bit type
265 CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
266 IF(NOT HAVE_STDINT_H)
267     IF(HAVE_WINDOWS_H)
268         CHECK_C_SOURCE_COMPILES("\#define _WIN32_WINNT 0x0500
269                                  \#include <windows.h>
270                                  __int64 foo;
271                                  int main() {return 0;}" HAVE___INT64)
272     ENDIF()
273     IF(NOT HAVE___INT64)
274         IF(NOT SIZEOF_LONG MATCHES "8")
275             IF(NOT SIZEOF_LONG_LONG MATCHES "8")
276                 MESSAGE(FATAL_ERROR "No 64-bit types found, please report!")
277             ENDIF()
278         ENDIF()
279     ENDIF()
280 ENDIF()
282 IF(WIN32)
283     # Windows needs winmm for timeGetTime, even if the backend is disabled
284     CHECK_SHARED_LIBRARY_EXISTS(winmm timeGetTime 0 "" HAVE_LIBWINMM)
285     IF(HAVE_LIBWINMM)
286         SET(EXTRA_LIBS winmm ${EXTRA_LIBS})
287     ENDIF()
288 ENDIF()
291 SET(OPENAL_OBJS  OpenAL32/alAuxEffectSlot.c
292                  OpenAL32/alBuffer.c
293                  OpenAL32/alDatabuffer.c
294                  OpenAL32/alEffect.c
295                  OpenAL32/alError.c
296                  OpenAL32/alExtension.c
297                  OpenAL32/alFilter.c
298                  OpenAL32/alListener.c
299                  OpenAL32/alSource.c
300                  OpenAL32/alState.c
301                  OpenAL32/alThunk.c
303 SET(ALC_OBJS  Alc/ALc.c
304               Alc/ALu.c
305               Alc/alcConfig.c
306               Alc/alcEcho.c
307               Alc/alcModulator.c
308               Alc/alcReverb.c
309               Alc/alcRing.c
310               Alc/alcThread.c
311               Alc/bs2b.c
312               Alc/null.c
315 SET(BACKENDS "")
316 SET(HAVE_ALSA       0)
317 SET(HAVE_OSS        0)
318 SET(HAVE_SOLARIS    0)
319 SET(HAVE_DSOUND     0)
320 SET(HAVE_WINMM      0)
321 SET(HAVE_PORTAUDIO  0)
322 SET(HAVE_PULSEAUDIO 0)
323 SET(HAVE_WAVE       0)
325 # Check ALSA backend
326 IF(ALSA)
327     CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H)
328     IF(HAVE_ALSA_ASOUNDLIB_H)
329         CHECK_SHARED_LIBRARY_EXISTS(asound snd_pcm_open 4 "" HAVE_LIBASOUND)
330         IF(HAVE_LIBASOUND OR HAVE_DLFCN_H OR WIN32)
331             SET(HAVE_ALSA 1)
332             SET(ALC_OBJS  ${ALC_OBJS} Alc/alsa.c)
333             IF(HAVE_DLFCN_H OR WIN32)
334                 SET(BACKENDS  "${BACKENDS} ALSA,")
335             ELSE()
336                 SET(BACKENDS  "${BACKENDS} ALSA \(linked\),")
337                 SET(EXTRA_LIBS asound ${EXTRA_LIBS})
338             ENDIF()
339         ENDIF()
340     ENDIF()
341 ENDIF()
343 # Check OSS backend
344 IF(OSS)
345     CHECK_INCLUDE_FILE(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
346     IF(HAVE_SYS_SOUNDCARD_H)
347         SET(HAVE_OSS 1)
348         SET(ALC_OBJS  ${ALC_OBJS} Alc/oss.c)
349         SET(BACKENDS  "${BACKENDS} OSS,")
350     ENDIF()
351 ENDIF()
353 # Check Solaris backend
354 IF(SOLARIS)
355     CHECK_INCLUDE_FILE(sys/audioio.h HAVE_SYS_AUDIOIO_H)
356     IF(HAVE_SYS_AUDIOIO_H)
357         SET(HAVE_SOLARIS 1)
358         SET(ALC_OBJS  ${ALC_OBJS} Alc/solaris.c)
359         SET(BACKENDS  "${BACKENDS} Solaris,")
360     ENDIF()
361 ENDIF()
363 # Check DSound/MMSystem backend
364 IF(DSOUND)
365     CHECK_INCLUDE_FILE(dsound.h HAVE_DSOUND_H)
366     IF(HAVE_DSOUND_H)
367         CHECK_SHARED_LIBRARY_EXISTS(dsound DirectSoundCreate 3 "" HAVE_LIBDSOUND)
368         IF(HAVE_LIBDSOUND OR HAVE_DLFCN_H OR WIN32)
369             SET(HAVE_DSOUND 1)
370             SET(ALC_OBJS  ${ALC_OBJS} Alc/dsound.c)
372             IF(HAVE_DLFCN_H OR WIN32)
373                 SET(BACKENDS  "${BACKENDS} DirectSound,")
374             ELSE()
375                 SET(BACKENDS  "${BACKENDS} DirectSound \(linked\),")
376                 SET(EXTRA_LIBS dsound ${EXTRA_LIBS})
377             ENDIF()
378         ENDIF()
379     ENDIF()
380 ENDIF()
382 IF(HAVE_WINDOWS_H)
383     IF(WINMM)
384         CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0500)
385         IF(HAVE_MMSYSTEM_H)
386             CHECK_SHARED_LIBRARY_EXISTS(winmm waveInOpen 6 "" HAVE_LIBWINMM)
387             IF(HAVE_LIBWINMM)
388                 SET(HAVE_WINMM 1)
389                 SET(ALC_OBJS  ${ALC_OBJS} Alc/winmm.c)
390                 SET(BACKENDS  "${BACKENDS} WinMM,")
392                 SET(EXTRA_LIBS winmm ${EXTRA_LIBS})
393             ENDIF()
394         ENDIF()
395     ENDIF()
396 ENDIF()
398 # Check PortAudio backend
399 IF(PORTAUDIO)
400     CHECK_INCLUDE_FILE(portaudio.h HAVE_PORTAUDIO_H)
401     IF(HAVE_PORTAUDIO_H)
402         CHECK_SHARED_LIBRARY_EXISTS(portaudio Pa_Initialize 0 "" HAVE_LIBPORTAUDIO)
403         IF(HAVE_LIBPORTAUDIO OR HAVE_DLFCN_H OR WIN32)
404             SET(HAVE_PORTAUDIO 1)
405             SET(ALC_OBJS  ${ALC_OBJS} Alc/portaudio.c)
406             IF(HAVE_DLFCN_H OR WIN32)
407                 SET(BACKENDS  "${BACKENDS} PortAudio,")
408             ELSE()
409                 SET(BACKENDS  "${BACKENDS} PortAudio \(linked\),")
410                 SET(EXTRA_LIBS portaudio ${EXTRA_LIBS})
411             ENDIF()
412         ENDIF()
413     ENDIF()
414 ENDIF()
416 # Check PortAudio backend
417 IF(PULSEAUDIO)
418     CHECK_INCLUDE_FILE(pulse/pulseaudio.h HAVE_PULSE_PULSEAUDIO_H)
419     IF(HAVE_PULSE_PULSEAUDIO_H)
420         CHECK_SHARED_LIBRARY_EXISTS(pulse pa_context_new 2 "" HAVE_LIBPULSE)
421         IF(HAVE_LIBPULSE OR HAVE_DLFCN_H OR WIN32)
422             SET(HAVE_PULSEAUDIO 1)
423             SET(ALC_OBJS  ${ALC_OBJS} Alc/pulseaudio.c)
424             IF(HAVE_DLFCN_H OR WIN32)
425                 SET(BACKENDS  "${BACKENDS} PulseAudio,")
426             ELSE()
427                 SET(BACKENDS  "${BACKENDS} PulseAudio \(linked\),")
428                 SET(EXTRA_LIBS pulse ${EXTRA_LIBS})
429             ENDIF()
430         ENDIF()
431     ENDIF()
432 ENDIF()
434 # Optionally enable the Wave Writer backend
435 IF(WAVE)
436     SET(HAVE_WAVE 1)
437     SET(ALC_OBJS  ${ALC_OBJS} Alc/wave.c)
438     SET(BACKENDS  "${BACKENDS} WaveFile,")
439 ENDIF()
441 # This is always available
442 SET(BACKENDS  "${BACKENDS} Null")
444 # Needed for openal.pc.in
445 SET(prefix ${CMAKE_INSTALL_PREFIX})
446 SET(exec_prefix "\${prefix}")
447 SET(libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
448 SET(bindir "\${exec_prefix}/bin")
449 SET(includedir "\${prefix}/include")
450 SET(PACKAGE_VERSION "${LIB_VERSION}")
452 # End configuration
453 CONFIGURE_FILE(
454     "${OpenAL_SOURCE_DIR}/config.h.in"
455     "${OpenAL_BINARY_DIR}/config.h")
456 CONFIGURE_FILE(
457     "${OpenAL_SOURCE_DIR}/openal.pc.in"
458     "${OpenAL_BINARY_DIR}/openal.pc"
459     @ONLY)
461 # Build a library
462 IF(NOT LIBTYPE)
463     SET(LIBTYPE SHARED)
464 ENDIF()
465 ADD_LIBRARY(${LIBNAME} ${LIBTYPE} ${OPENAL_OBJS} ${ALC_OBJS})
466 SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES DEFINE_SYMBOL AL_BUILD_LIBRARY
467                                             COMPILE_FLAGS -DAL_ALEXT_PROTOTYPES
468                                             VERSION ${LIB_VERSION}
469                                             SOVERSION ${LIB_MAJOR_VERSION})
470 IF(WIN32)
471     SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES PREFIX "")
472 ENDIF()
474 TARGET_LINK_LIBRARIES(${LIBNAME} ${EXTRA_LIBS})
476 # Add an install target here
477 INSTALL(TARGETS ${LIBNAME}
478         RUNTIME DESTINATION bin
479         LIBRARY DESTINATION "lib${LIB_SUFFIX}"
480         ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
482 INSTALL(FILES include/AL/al.h
483               include/AL/alc.h
484               include/AL/alext.h
485               include/AL/efx.h
486               include/AL/efx-creative.h
487         DESTINATION include/AL
489 INSTALL(FILES "${OpenAL_BINARY_DIR}/openal.pc"
490         DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
493 MESSAGE(STATUS "")
494 MESSAGE(STATUS "Building OpenAL with support for the following backends:")
495 MESSAGE(STATUS "    ${BACKENDS}")
496 MESSAGE(STATUS "")
498 IF(WIN32)
499     IF(NOT HAVE_DSOUND)
500         MESSAGE(STATUS "WARNING: Building the Windows version without DirectSound output")
501         MESSAGE(STATUS "         This is probably NOT what you want!")
502         MESSAGE(STATUS "")
503     ENDIF()
504 ENDIF()
506 # Install alsoft.conf configuration file
507 IF(ALSOFT_CONFIG)
508     INSTALL(FILES alsoftrc.sample
509             DESTINATION /etc/openal
510             RENAME alsoft.conf
511     )
512     MESSAGE(STATUS "Installing sample alsoft.conf")
513     MESSAGE(STATUS "")
514 ENDIF()
516 IF(UTILS)
517     ADD_EXECUTABLE(openal-info utils/openal-info.c)
518     TARGET_LINK_LIBRARIES(openal-info ${LIBNAME})
519     INSTALL(TARGETS openal-info
520             RUNTIME DESTINATION bin
521             LIBRARY DESTINATION "lib${LIB_SUFFIX}"
522             ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
523     )
524     MESSAGE(STATUS "Building utility programs")
525     MESSAGE(STATUS "")
526 ENDIF()