--- src/CMakeLists.txt.orig 2014-10-16 15:33:19.000000000 +0200 +++ src/CMakeLists.txt 2014-10-16 15:33:53.000000000 +0200 @@ -127,6 +127,13 @@ # From here on, the setting variables have been prepared so concentrate # on the actual compiling. +if(PaEnable) + include_directories(${PORTAUDIO_INCLUDE_DIRS}) + add_definitions(-DPORTAUDIO=1) + list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES}) + list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS}) +endif() + if(AlsaEnable) list(APPEND AUDIO_LIBRARIES ${ASOUND_LIBRARY}) list(APPEND AUDIO_LIBRARY_DIRS ${ASOUND_LIBRARY_DIRS}) @@ -143,13 +150,6 @@ add_definitions(-DOSS=1) endif(OssEnable) -if(PaEnable) - include_directories(${PORTAUDIO_INCLUDE_DIR}) - add_definitions(-DPORTAUDIO=1) - list(APPEND AUDIO_LIBRARIES ${PORTAUDIO_LIBRARIES}) - list(APPEND AUDIO_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS}) -endif() - if (CompileTests) ENABLE_TESTING() endif()