diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cc1a7213..46ff4049 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1197,6 +1197,12 @@ CONFIGURE_FILE( "${OpenAL_BINARY_DIR}/openal.pc" @ONLY) +MACRO(ADD_INCLUDE_DIRS TRGT TESTVAR INCVAR) + IF(${TESTVAR}) + SET_PROPERTY(TARGET ${TRGT} APPEND PROPERTY INCLUDE_DIRECTORIES ${${INCVAR}}) + ENDIF() +ENDMACRO() + # Build main library IF(LIBTYPE STREQUAL "STATIC") ADD_LIBRARY(OpenAL STATIC ${COMMON_OBJS} ${OPENAL_OBJS} ${ALC_OBJS}) @@ -1209,33 +1215,15 @@ IF(WIN32 AND ALSOFT_NO_UID_DEFS) SET_PROPERTY(TARGET OpenAL APPEND PROPERTY COMPILE_DEFINITIONS AL_NO_UID_DEFS) ENDIF() SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES "${OpenAL_SOURCE_DIR}/OpenAL32/Include" "${OpenAL_SOURCE_DIR}/Alc") -IF(HAVE_ALSA) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_OSS) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${OSS_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_SOLARIS) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${AUDIOIO_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_SNDIO) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${SOUNDIO_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_QSA) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${QSA_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_DSOUND) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${DSOUND_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_PORTAUDIO) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${PORTAUDIO_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_PULSEAUDIO) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${PULSEAUDIO_INCLUDE_DIRS}) -ENDIF() -IF(HAVE_JACK) - SET_PROPERTY(TARGET OpenAL APPEND PROPERTY INCLUDE_DIRECTORIES ${JACK_INCLUDE_DIRS}) -ENDIF() +ADD_INCLUDE_DIRS(OpenAL HAVE_ALSA ALSA_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_OSS OSS_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_SOLARIS AUDIOIO_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_SNDIO SOUNDIO_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_QSA QSA_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_DSOUND DSOUND_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_PORTAUDIO PORTAUDIO_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_PULSEAUDIO PULSEAUDIO_INCLUDE_DIRS) +ADD_INCLUDE_DIRS(OpenAL HAVE_JACK JACK_INCLUDE_DIRS) IF(WIN32) IF(MSVC) SET_PROPERTY(TARGET OpenAL APPEND_STRING PROPERTY LINK_FLAGS " /SUBSYSTEM:WINDOWS") |