)
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
)