You could generate a script that you call that calls the configure command the way you want it to and then execute the script as the configure command...<div><br></div><div>I'll take a look at passing args like this and see if I can figure out a way to get them to work. For now, the generate script approach should definitely work for you.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br><br><div class="gmail_quote">On Thu, Nov 19, 2009 at 8:36 AM, <span dir="ltr"><<a href="mailto:winfried_mb2@xmsnet.nl">winfried_mb2@xmsnet.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
I'm trying to build several external libraries with the ExternalProject_Add command, among which ffmpeg.<br>
<br>
When using the msys generator, I can't find a way to add multiple compile flags to the configure script.<br>
<br>
The configure command should be generated like this:<br>
configure --prefix=/some/path --extra-cflags='-mno-cygwin -mms-bitfields'<br>
<br>
However when I specify CONFIGURE_COMMAND as follows:<br>
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags='-mno-cygwin -mms-bitfields'<br>
the configure command ends up in the generated makefile as follows:<br>
configure --prefix=/c//buildtools_data/externals/EXTERNALS_1_0_0/ffmpeg/Release "--extra-cflags='-mno-cygwin" "-mms-bitfields'"<br>
<br>
I've tried all kinds of possibilities such as:<br>
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} "--extra-cflags='-mno-cygwin -mms-bitfields'"<br>
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags="-mno-cygwin -mms-bitfields"<br>
CONFIGURE_COMMAND "configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags='-mno-cygwin -mms-bitfields'"<br>
all of which give an error during configure.<br>
<br>
If anybody knows a way to do this, I'd be glad to hear.<br>
<br>
regards,<br>
W. Dobbe<br>
<br>
ps:<br>
<br>
The complete externalproject_add command is<br>
<br>
ExternalProject_Add(<br>
ffmpeg<br>
PREFIX ffmpeg<br>
DOWNLOAD_COMMAND svn export ${SVN_3RDPARTY_URL}/ffmpeg/${FFMPEG_VERSION}/ffmpeg_${FFMPEG_VERSION}.tar.bz2 && ${CMAKE_COMMAND} -E chdir ${FFMP_PATH}/src/ffmpeg tar xvfj ../ffmpeg_${FFMPEG_VERSION}.tar.bz2 --strip-components=1<br>
UPDATE_COMMAND ""<br>
CONFIGURE_COMMAND ${FFMP_PATH}/src/ffmpeg/configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags='-mno-cygwin -mms-bitfields' --extra-ldflags='-Wl -add-stdcall-alias' --enable-memalign-hack --target-os=mingw32 --enable-shared --disable-static<br>
)<br>
<br>
cmake called as follows:<br>
cmake -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release .<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>