diff options
author | Chris Robinson <[email protected]> | 2014-04-22 07:21:19 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-22 07:21:19 -0700 |
commit | d5ac11c87f9b158d2c9a980a2ad38e7165de3d64 (patch) | |
tree | 31649fc94d6df85b459f54554e0384754b8da126 | |
parent | f6ad3ef221411c8a66931001ef20694dedc81c94 (diff) |
Fix adding backend include directories
-rw-r--r-- | CMakeLists.txt | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d868c9e..861d57b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -622,8 +622,6 @@ IF(ALSA_FOUND) OPTION(ALSOFT_BACKEND_ALSA "Enable ALSA backend" ON) IF(ALSOFT_BACKEND_ALSA) SET(HAVE_ALSA 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/alsa.c PROPERTIES - INCLUDE_DIRECTORIES "${ALSA_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/alsa.c) IF(HAVE_DLFCN_H OR WIN32) SET(BACKENDS "${BACKENDS} ALSA,") @@ -631,6 +629,9 @@ IF(ALSA_FOUND) SET(BACKENDS "${BACKENDS} ALSA \(linked\),") SET(EXTRA_LIBS ${ALSA_LIBRARIES} ${EXTRA_LIBS}) ENDIF() + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${ALSA_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_ALSA AND NOT HAVE_ALSA) @@ -644,10 +645,11 @@ IF(OSS_FOUND) OPTION(ALSOFT_BACKEND_OSS "Enable OSS backend" ON) IF(ALSOFT_BACKEND_OSS) SET(HAVE_OSS 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/oss.c PROPERTIES - INCLUDE_DIRECTORIES "${OSS_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/oss.c) SET(BACKENDS "${BACKENDS} OSS,") + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${OSS_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_OSS AND NOT HAVE_OSS) @@ -661,10 +663,11 @@ IF(AUDIOIO_FOUND) OPTION(ALSOFT_BACKEND_SOLARIS "Enable Solaris backend" ON) IF(ALSOFT_BACKEND_SOLARIS) SET(HAVE_SOLARIS 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/solaris.c PROPERTIES - INCLUDE_DIRECTORIES "${AUDIOIO_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/solaris.c) SET(BACKENDS "${BACKENDS} Solaris,") + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${AUDIOIO_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_SOLARIS AND NOT HAVE_SOLARIS) @@ -678,11 +681,12 @@ IF(SOUNDIO_FOUND) OPTION(ALSOFT_BACKEND_SNDIO "Enable SndIO backend" ON) IF(ALSOFT_BACKEND_SNDIO) SET(HAVE_SNDIO 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/sndio.c PROPERTIES - INCLUDE_DIRECTORIES "${SOUNDIO_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/sndio.c) SET(BACKENDS "${BACKENDS} SndIO \(linked\),") SET(EXTRA_LIBS ${SOUNDIO_LIBRARIES} ${EXTRA_LIBS}) + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${SOUNDIO_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_SNDIO AND NOT HAVE_SNDIO) @@ -696,11 +700,12 @@ IF(QSA_FOUND) OPTION(ALSOFT_BACKEND_QSA "Enable QSA backend" ON) IF(ALSOFT_BACKEND_QSA) SET(HAVE_QSA 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/qsa.c PROPERTIES - INCLUDE_DIRECTORIES "${QSA_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/qsa.c) SET(EXTRA_LIBS ${QSA_LIBRARIES} ${EXTRA_LIBS}) SET(BACKENDS "${BACKENDS} QSA \(linked\),") + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${QSA_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_QSA AND NOT HAVE_QSA) @@ -714,8 +719,6 @@ IF(DSOUND_FOUND) OPTION(ALSOFT_BACKEND_DSOUND "Enable DirectSound backend" ON) IF(ALSOFT_BACKEND_DSOUND) SET(HAVE_DSOUND 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/dsound.c PROPERTIES - INCLUDE_DIRECTORIES "${DSOUND_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/dsound.c) IF(HAVE_DLFCN_H OR WIN32) SET(BACKENDS "${BACKENDS} DirectSound,") @@ -723,6 +726,9 @@ IF(DSOUND_FOUND) SET(BACKENDS "${BACKENDS} DirectSound \(linked\),") SET(EXTRA_LIBS ${DSOUND_LIBRARIES} ${EXTRA_LIBS}) ENDIF() + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${DSOUND_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_DSOUND AND NOT HAVE_DSOUND) @@ -775,8 +781,6 @@ IF(PORTAUDIO_FOUND) OPTION(ALSOFT_BACKEND_PORTAUDIO "Enable PortAudio backend" ON) IF(ALSOFT_BACKEND_PORTAUDIO) SET(HAVE_PORTAUDIO 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/portaudio.c PROPERTIES - INCLUDE_DIRECTORIES "${PORTAUDIO_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/portaudio.c) IF(HAVE_DLFCN_H OR WIN32) SET(BACKENDS "${BACKENDS} PortAudio,") @@ -784,6 +788,9 @@ IF(PORTAUDIO_FOUND) SET(BACKENDS "${BACKENDS} PortAudio \(linked\),") SET(EXTRA_LIBS ${PORTAUDIO_LIBRARIES} ${EXTRA_LIBS}) ENDIF() + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${PORTAUDIO_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_PORTAUDIO AND NOT HAVE_PORTAUDIO) @@ -797,8 +804,6 @@ IF(PULSEAUDIO_FOUND) OPTION(ALSOFT_BACKEND_PULSEAUDIO "Enable PulseAudio backend" ON) IF(ALSOFT_BACKEND_PULSEAUDIO) SET(HAVE_PULSEAUDIO 1) - SET_SOURCE_FILES_PROPERTIES(Alc/backends/pulseaudio.c PROPERTIES - INCLUDE_DIRECTORIES "${PULSEAUDIO_INCLUDE_DIRS}") SET(ALC_OBJS ${ALC_OBJS} Alc/backends/pulseaudio.c) IF(HAVE_DLFCN_H OR WIN32) SET(BACKENDS "${BACKENDS} PulseAudio,") @@ -806,6 +811,9 @@ IF(PULSEAUDIO_FOUND) SET(BACKENDS "${BACKENDS} PulseAudio \(linked\),") SET(EXTRA_LIBS ${PULSEAUDIO_LIBRARIES} ${EXTRA_LIBS}) ENDIF() + IF(CMAKE_VERSION VERSION_LESS "2.8.8") + INCLUDE_DIRECTORIES(${PULSEAUDIO_INCLUDE_DIRS}) + ENDIF() ENDIF() ENDIF() IF(ALSOFT_REQUIRE_PULSEAUDIO AND NOT HAVE_PULSEAUDIO) @@ -920,6 +928,30 @@ SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES "${OpenAL_SOU IF(FLUIDSYNTH_FOUND) SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${FLUIDSYNTH_INCLUDE_DIR}) ENDIF() +IF(HAVE_ALSA) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS}) +ENDIF() +IF(HAVE_OSS) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${OSS_INCLUDE_DIRS}) +ENDIF() +IF(HAVE_SOLARIS) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${AUDIOIO_INCLUDE_DIRS}) +ENDIF() +IF(HAVE_SNDIO) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${SOUNDIO_INCLUDE_DIRS}) +ENDIF() +IF(HAVE_QSA) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${QSA_INCLUDE_DIRS}) +ENDIF() +IF(HAVE_DSOUND) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${DSOUND_INCLUDE_DIRS}) +ENDIF() +IF(HAVE_PORTAUDIO) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${PORTAUDIO_INCLUDE_DIRS}) +ENDIF() +IF(HAVE_PULSEAUDIO) + SET_PROPERTY(TARGET ${LIBNAME} APPEND PROPERTY INCLUDE_DIRECTORIES ${PULSEAUDIO_INCLUDE_DIRS}) +ENDIF() SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION} SOVERSION ${LIB_MAJOR_VERSION}) IF(WIN32 AND NOT LIBTYPE STREQUAL "STATIC") |