[Cmake] RE: [Vxl-users] RE: VXL binaries for Windows?
Wheeler, Frederick W (Research)
wheeler at crd.ge.com
Thu, 8 Jan 2004 09:56:10 -0500
> Mark Galassi wrote:
>
> Sadly this does not seem to be the case: I have had no success using
> cmake with gcc/MinGW on Windows. This is really the stumbling point
> on the entire VXL: that cmake does not set things up properly for
> MinGW.
CMake-MinGW support is much better than I realized just yesterday. I'm
compiling in cygwin using the cygwin installed version of gcc and the
-mno-cygwin option to use MinGW. I guess you could be using MinGW outside
of Cygwin, which could be different. According to Bill Hoffman's posts to
the CMake mailing list the key is to use the Windows version of CMake and to
generate Unix Makefiles.
http://www.cmake.org/pipermail/cmake/2003-August/004240.html
The configuration commands I'm using now are below. vcl/testlib/vpl/vsl/vbl
and some other core libs compile fine. vil/vnl will need tweaks for MinGW.
I'm looking into this myself, but can't make any guarantees. At a glance
some problems have to do with IO and isnan().
Fred Wheeler
# may need to add defined(__MINGW32__) here and these
mkdir -p $TOP/vxl_bld_min
rm -f $TOP/vxl_bld_min/CMakeCache.txt
cd $TOP/vxl_bld_min
# use the windows version of cmake, but make Unix Makefiles
"/cygdrive/c/Program Files/CMake/bin/cmake" \
-G"Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX:PATH="`cygpath -w $TOP/vxl_usr_min`" \
-DCMAKE_C_COMPILER:FILEPATH="`cygpath -w /usr/bin/gcc`" \
-DCMAKE_CXX_COMPILER:FILEPATH="`cygpath -w /usr/bin/g++`" \
-DCMAKE_C_LINK_SHARED:FILEPATH="`cygpath -w /usr/bin/gcc`" \
-DCMAKE_CXX_LINK_SHARED:FILEPATH="`cygpath -w /usr/bin/g++`" \
-DCMAKE_C_FLAGS:STRING="-Wall -g -O0 -mno-cygwin" \
-DCMAKE_CXX_FLAGS:STRING="-Wall -g -O0 -mno-cygwin" \
-DX11_X11_INCLUDE_PATH:PATH=IGNORE \
-DVXL_FORCE_V3P_ZLIB:BOOL=YES \
-DVXL_FORCE_V3P_PNG:BOOL=YES \
-DVXL_FORCE_V3P_JPEG:BOOL=YES \
-DVXL_FORCE_V3P_MPEG2:BOOL=YES \
-DVXL_FORCE_V3P_TIFF:BOOL=YES \
-DBUILD_VGUI:BOOL=NO \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
"`cygpath -w $TOP/vxl_src`"
cd $TOP/vxl_bld_min
time make -i
time make -i