@ -123,7 +123,7 @@ the build environment for your system.
CMake generates MSVC .sln and .vcproj files for your target environment.
CMake generates MSVC .sln and .vcproj files for your target environment.
The files generated by CMake provide 4 configs: Debug|Release|RelWithDebInfo|MinSizeRel
The files generated by CMake provide 4 configs: Debug|Release|RelWithDebInfo|MinSizeRel
The current architecture of CMake requires you to decide before running cmake:
The current architecture of CMake requires you to decide before running cmake:
1)The version of DevStudio
1)The version of DevStudio
2) 32bit or 64 bit builds
2) 32bit or 64 bit builds
3) Building static or shared libraries
3) Building static or shared libraries
@ -150,158 +150,10 @@ We have two contributed CMake Build Environments:
4 Building and installing for MinGW Users
4 Building and installing for MinGW Users
=========================================
=========================================
1 Running a MinGW bash shell
CMake/MinGW has a number of serious issues. This will be reported to Kitware.
I installed MinGW using the installer on the web site.
I installed two copies c:\MinGW and c:\MinGW64
- both copies run a 32 bit bash shell
I installed the TDM-GCC-64 compiler for use from MinGW64
I installed the Qt 5.6.0 Environement for use from MinGW
I start mingw from DOS with this batch-file (mingw32.bat)
C:\>type c:\Users\rmills\com\mingw32.bat
@echo off
rem ------------------
: mingw32.bat
: invoke MinGW bash
:
setlocal
set "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
set "INCLUDE_PATH=/usr/local/inc"
set "LIBRARY_PATH=/usr/local/lib"
set "BINARY_PATH=/usr/local/bin"
rem set "PATH=c:\MinGW\bin;c:\MinGW\msys\1.0\bin;c:\MinGW\msys\1.0\local\bin;c:\Users\rmills\com;."
set "PATH=c:\Qt\Qt5.6.0\5.6\mingw49_32\bin;c:\Qt\Qt5.6.0\Tools\mingw492_32\bin;c:\MinGW\bin;\usr\bin:\usr\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
alias path='(IFS=:;for i in $PATH; do echo $i; done)'
##
# finder helpers
export L="-exec ls -dalt {} ;"
export X="-exec rm -rf {} ;"
export C="-exec ce {} ;"
export I="-exec lipo -info {} ;"
export O="-exec otool -L {} ;"
export Z="-exec open {} ;"
export P="-exec p4 edit {} ;"
export R="-exec p4 revert {} ;"
export G="-exec grep"
export __=";"
export ___="{} ;"
# That's all Folks!
##503 -32- /home/rmills>
MinGW64 has very similar code. Putting the TDM compiler on the path is the major difference
C:\Users\rmills\com>diff mingw32.bat mingw64.bat
3c3
< : mingw32.bat
---
> : mingw64.bat
11,14c11,25
< rem set "PATH=c:\MinGW\bin;c:\MinGW\msys\1.0\bin;c:\MinGW\msys\1.0\local\bin;c:\Users\rmills\com;."
< set "PATH=c:\Qt\Qt5.6.0\5.6\mingw49_32\bin;c:\Qt\Qt5.6.0\Tools\mingw492_32\bin;c:\MinGW\bin;\usr\bin:\usr\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
< set "PS1=\! -32- ${PWD}> "
< c:\MinGW\msys\1.0\bin\bash.exe %*%
---
> : TDM 4.9.2
> set "PATH=c:\TDM-GCC-64\bin;c:\MinGW64\bin;c:\MinGW64\msys\1.0\bin;C:\MinGW64\msys\1.0\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
>
> : 4.9.2 compiler
> : set "PATH=c:\mingw-w64\mingw64\bin;c:\mingw-w64\mingw64\opt\bin;;c:\MinGW64\bin;c:\MinGW64\msys\1.0\bin;C:\MinGW64\msys\1.0\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
>
> : TDM 5.1 compiler
> : set "PATH=c:\TDM-GCC-51-64\bin;c:\TDM-GCC-51-64\x86_64-w64-mingw32\bin;c:\MinGW64\bin;c:\MinGW64\msys\1.0\bin;C:\MinGW64\msys\1.0\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
>
> set "PS1=\! -64- ${PWD}> "
> : 32 bit MinGW/bash
> c:\MinGW64\msys\1.0\bin\bash.exe %*%
>
> : 64 bit Cygwin shell
> : c:\cygwin64\bin\bash.exe
2 Building and installing CMake
$ ./bookstrap --prefix=/usr/local
$ make
$ make install
Gotchas:
It is possible to use CMake/MinGW if you put in some effort. This is documented in TODO-CMAKE.
1) Do not use a Windows binary install version of CMake
This generates commands which assume you are in the DOS shell.
Build and Use CMake in a "Unix" Way from a MinGW/bash shell.
2) Even although gcc is on the path, we must tell cmake not to use /c/MinGW/bin/gcc)
3) It's using the wrong headers. Needs /c/Qt/Qt5.6.0/Tools/mingw492_32/i686-w64-mingw32/include
ToDo: * CMake/MinGW builds executables that do not work properly for v0.26
ToDo: * CMake/MinGW builds executables that do not work properly for v0.26
Known issues:
Known issues:
sample apps crash in XML_ParserCreate()
sample apps crash in XML_ParserCreate()
in c:\MinGW\msys\1.0\bin\msys-expat-1.dll
in c:\MinGW\msys\1.0\bin\msys-expat-1.dll
This is because MinGW links the wrong DLLs.
Team Exiv2 will not provide support for CMake/MinGW
The known issues with CMake/MinGW will be reported to Kitware.
We hope CMake/MinGW will be in a working state for Exiv2 v0.27
Here are notes concerning CMake/MinGW
1 Running a MinGW bash shell
I installed MinGW using the installer on the web site.
I installed two copies c:\MinGW and c:\MinGW64
- both copies run a 32 bit bash shell
I installed the TDM-GCC-64 compiler for use from MinGW64
I installed the Qt 5.6.0 Environement for use from MinGW
I start mingw from DOS with this batch-file (mingw32.bat)
C:\>type c:\Users\rmills\com\mingw32.bat
@echo off
rem ------------------
: mingw32.bat
: invoke MinGW bash
:
setlocal
set "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
set "INCLUDE_PATH=/usr/local/inc"
set "LIBRARY_PATH=/usr/local/lib"
set "BINARY_PATH=/usr/local/bin"
rem set "PATH=c:\MinGW\bin;c:\MinGW\msys\1.0\bin;c:\MinGW\msys\1.0\local\bin;c:\Users\rmills\com;."
set "PATH=c:\Qt\Qt5.6.0\5.6\mingw49_32\bin;c:\Qt\Qt5.6.0\Tools\mingw492_32\bin;c:\MinGW\bin;\usr\bin:\usr\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
alias path='(IFS=:;for i in $PATH; do echo $i; done)'
##
# finder helpers
export L="-exec ls -dalt {} ;"
export X="-exec rm -rf {} ;"
export C="-exec ce {} ;"
export I="-exec lipo -info {} ;"
export O="-exec otool -L {} ;"
export Z="-exec open {} ;"
export P="-exec p4 edit {} ;"
export R="-exec p4 revert {} ;"
export G="-exec grep"
export __=";"
export ___="{} ;"
# That's all Folks!
##503 -32- /home/rmills>
MinGW64 has very similar code. Putting the TDM compiler on the path is the major difference
C:\Users\rmills\com>diff mingw32.bat mingw64.bat
3c3
< : mingw32.bat
---
> : mingw64.bat
11,14c11,25
< rem set "PATH=c:\MinGW\bin;c:\MinGW\msys\1.0\bin;c:\MinGW\msys\1.0\local\bin;c:\Users\rmills\com;."
< set "PATH=c:\Qt\Qt5.6.0\5.6\mingw49_32\bin;c:\Qt\Qt5.6.0\Tools\mingw492_32\bin;c:\MinGW\bin;\usr\bin:\usr\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
< set "PS1=\! -32- ${PWD}> "
< c:\MinGW\msys\1.0\bin\bash.exe %*%
---
> : TDM 4.9.2
> set "PATH=c:\TDM-GCC-64\bin;c:\MinGW64\bin;c:\MinGW64\msys\1.0\bin;C:\MinGW64\msys\1.0\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
>
> : 4.9.2 compiler
> : set "PATH=c:\mingw-w64\mingw64\bin;c:\mingw-w64\mingw64\opt\bin;;c:\MinGW64\bin;c:\MinGW64\msys\1.0\bin;C:\MinGW64\msys\1.0\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
>
> : TDM 5.1 compiler
> : set "PATH=c:\TDM-GCC-51-64\bin;c:\TDM-GCC-51-64\x86_64-w64-mingw32\bin;c:\MinGW64\bin;c:\MinGW64\msys\1.0\bin;C:\MinGW64\msys\1.0\local\bin;c:\cygwin64\bin;c:\Users\rmills\com;."
>
> set "PS1=\! -64- ${PWD}> "
> : 32 bit MinGW/bash
> c:\MinGW64\msys\1.0\bin\bash.exe %*%
>
> : 64 bit Cygwin shell
> : c:\cygwin64\bin\bash.exe
2 Building and installing CMake
$ ./bookstrap --prefix=/usr/local
$ make
$ make install
Gotchas:
1) Do not use a Windows binary install version of CMake
This generates commands which assume you are in the DOS shell.
Build and Use CMake in a "Unix" Way from a MinGW/bash shell.
2) Even although gcc is on the path, we must tell cmake not to use /c/MinGW/bin/gcc)
3) It's using the wrong headers. Needs /c/Qt/Qt5.6.0/Tools/mingw492_32/i686-w64-mingw32/include