From: hobbes1069 Date: Tue, 16 Jun 2015 03:00:07 +0000 (+0000) Subject: Make static portaudio build cross-compiling aware. X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=9d9a190e4cd4e7b8495e05552601132741f41902;p=freetel-svn-tracking.git Make static portaudio build cross-compiling aware. git-svn-id: https://svn.code.sf.net/p/freetel/code@2195 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2-dev/cmake/BuildPortaudio.cmake b/fdmdv2-dev/cmake/BuildPortaudio.cmake index c058061d..60e9660c 100644 --- a/fdmdv2-dev/cmake/BuildPortaudio.cmake +++ b/fdmdv2-dev/cmake/BuildPortaudio.cmake @@ -11,12 +11,19 @@ On Linux systems try installing: ) endif() +# Make sure that configure knows what system we're using when cross-compiling. +if(MINGW AND CMAKE_CROSSCOMPILING) + set(CONFIGURE_COMMAND ./configure --build=${HOST} --host=${HOST} --target=${HOST} --enable-cxx --without-jack --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist) +else() + set(CONFIGURE_COMMAND ./configure --enable-cxx --without-jack --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist) +endif() + include(ExternalProject) ExternalProject_Add(portaudio URL http://www.portaudio.com/archives/${PORTAUDIO_TARBALL}.tgz BUILD_IN_SOURCE 1 INSTALL_DIR external/dist - CONFIGURE_COMMAND ./configure --enable-cxx --without-jack --prefix=${CMAKE_BINARY_DIR}/external/dist + CONFIGURE_COMMAND ${CONFIGURE_COMMAND} BUILD_COMMAND $(MAKE) INSTALL_COMMAND $(MAKE) install )