I'm trying to build several external libraries with the ExternalProject_Add 
command, among which ffmpeg.

When using the msys generator, I can't find a way to add multiple compile flags 
to the configure script.

The configure command should be generated like this:
configure --prefix=/some/path --extra-cflags='-mno-cygwin -mms-bitfields'

However when I specify CONFIGURE_COMMAND as follows:
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} 
--extra-cflags='-mno-cygwin -mms-bitfields' 
the configure command ends up in the generated makefile as follows:
configure --prefix=/c//buildtools_data/externals/EXTERNALS_1_0_0/ffmpeg/Release 
"--extra-cflags='-mno-cygwin" "-mms-bitfields'"

I've tried all kinds of possibilities such as:
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} 
"--extra-cflags='-mno-cygwin -mms-bitfields'"
CONFIGURE_COMMAND configure --prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} 
--extra-cflags="-mno-cygwin -mms-bitfields"
CONFIGURE_COMMAND "configure 
--prefix=${EXT_BASE_DIR}/ffmpeg/${CMAKE_BUILD_TYPE} --extra-cflags='-mno-cygwin 
-mms-bitfields'"
all of which give an error during configure.

If anybody knows a way to do this, I'd be glad to hear.

regards,
W. Dobbe

ps:

The complete externalproject_add command is

ExternalProject_Add(
    ffmpeg
    PREFIX ffmpeg
    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
    UPDATE_COMMAND ""
    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 
  )

cmake called as follows:
cmake -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release  .
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to