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&#39;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">&lt;<a href="mailto:winfried_mb2@xmsnet.nl">winfried_mb2@xmsnet.nl</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
I&#39;m trying to build several external libraries with the ExternalProject_Add command, among which ffmpeg.<br>
<br>
When using the msys generator, I can&#39;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=&#39;-mno-cygwin -mms-bitfields&#39;<br>
<br>
However when I specify CONFIGURE_COMMAND as follows:<br>
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags=&#39;-mno-cygwin -mms-bitfields&#39;<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 &quot;--extra-cflags=&#39;-mno-cygwin&quot; &quot;-mms-bitfields&#39;&quot;<br>
<br>
I&#39;ve tried all kinds of possibilities such as:<br>
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} &quot;--extra-cflags=&#39;-mno-cygwin -mms-bitfields&#39;&quot;<br>
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags=&quot;-mno-cygwin -mms-bitfields&quot;<br>
CONFIGURE_COMMAND &quot;configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags=&#39;-mno-cygwin -mms-bitfields&#39;&quot;<br>
all of which give an error during configure.<br>
<br>
If anybody knows a way to do this, I&#39;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 &amp;&amp; ${CMAKE_COMMAND} -E chdir ${FFMP_PATH}/src/ffmpeg tar xvfj ../ffmpeg_${FFMPEG_VERSION}.tar.bz2 --strip-components=1<br>

    UPDATE_COMMAND &quot;&quot;<br>
    CONFIGURE_COMMAND ${FFMP_PATH}/src/ffmpeg/configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags=&#39;-mno-cygwin -mms-bitfields&#39; --extra-ldflags=&#39;-Wl -add-stdcall-alias&#39; --enable-memalign-hack --target-os=mingw32 --enable-shared --disable-static<br>

  )<br>
<br>
cmake called as follows:<br>
cmake -G&quot;MSYS Makefiles&quot; -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>