INCLUDE_DIRECTORIES(
  ${QT_QTGUI_INCLUDE_DIR}
)

SET(TRAVERSO_ENGINE_MOC_CLASSES
AudioBus.h
AudioDevice.h
Client.h
)

SET(TRAVERSO_ENGINE_SOURCES
AudioBus.cpp
AudioChannel.cpp
AudioDevice.cpp
AudioDeviceThread.cpp
Client.cpp
Driver.cpp
memops.cpp
)

IF(HAVE_ALSA)
	SET(TRAVERSO_ENGINE_SOURCES
	AlsaDriver.cpp
	${TRAVERSO_ENGINE_SOURCES}
	)
ENDIF(HAVE_ALSA)

IF(HAVE_JACK)
	SET(TRAVERSO_ENGINE_SOURCES
	JackDriver.cpp
	${TRAVERSO_ENGINE_SOURCES}
	)
	SET(TRAVERSO_ENGINE_MOC_CLASSES
	JackDriver.h
	${TRAVERSO_ENGINE_MOC_CLASSES}
	)
ENDIF(HAVE_JACK)

IF(HAVE_PORTAUDIO)
	SET(TRAVERSO_ENGINE_SOURCES
	PADriver.cpp
	${TRAVERSO_ENGINE_SOURCES}
	)
ENDIF(HAVE_PORTAUDIO)

SET(TRAVERSO_ENGINE_LIBRARY "traversoaudiobackend")

QT4_WRAP_CPP(TRAVERSO_ENGINE_MOC_SOURCES ${TRAVERSO_ENGINE_MOC_CLASSES})

ADD_LIBRARY(${TRAVERSO_ENGINE_LIBRARY} STATIC ${TRAVERSO_ENGINE_SOURCES} ${TRAVERSO_ENGINE_MOC_SOURCES})

IF(USE_PCH)
    ADD_DEPENDENCIES(traversoaudiobackend precompiled_headers)
ENDIF(USE_PCH)
