You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
exiv2/README-CMAKE

184 lines
7.5 KiB
Plaintext

@@@Marco@@@@@b ;mm /##Gilles###\
j@@@#Robin", Brad /@@@Thomas@@@@Q
@@@# \ ## @@@b |@@@b
@@@# .;;;;, ,;;;, ,;;;; ,;;;p .;;; 7@@ ]Alan
@@@# j@@@@, ]@@#/ '@@@# j@@@# ]@@^ ;@@@"
@@@Andreas@C "@@@p @@@" @@@b j@@@p @@b @@@#/
@@@#^7"7%#\ ^@@@@@#~ Benb 1@@@ {@# s@@@#
@@@# Niels @@@b @@@Q ]@# ;@@@#/
@@@# ,@@##@@m @@@b @@@p @@C #@@#C
@@@# ,/ s@@# @@@@ @@@b Volker @Tuan@
]@@@Abhinav@@\ /@@@\ \@@@Q @@@Q %@@@# /@@@@Mahesh@@#
/@@Raphael@@@@@\ /@@@@@\ C++ Metadata Library /@Sridhar@@@v0.26\
16 years ago
-------------------------------------------------------------------------------
CMake is a cross-platform build system, to control the
compilation process using platform/compiler independent configuration files.
STATUS:
15 years ago
* CMake scripts are functional and used to perform the daily build on the buildserver
for MacOS-X, Cygwin, Linux and Visual Studio (2005, 8, 10, 12, 13 and 15)
The daily build on MinGW/32 is performed using autotools for Qt/Windows Users.
* The existing automake (./configure) is currently still be supported by exiv2.
There are plans to adopt CMake as the only build platform and drop the automake
code and the existing Visual Studio Solutions.
* Team Exiv2 no longer provide support for MinGW (with/without CMake)
Exiv2 is very difficult to build on MinGW with CMake.
This is discussed in TODO-CMAKE
Robin Mills
robin@clanmills.com
Luis Díaz Más
piponazo@gmail.com
2017-01-09
15 years ago
16 years ago
-------------------------------------------------------------------------------
TABLE OF CONTENTS
-----------------
1 CMake resources
2 Building and Installing for Unix type systems
3 Building and Installing for Visual Studio Users
4 Building and installing for MinGW Users
1 CMake resources
=================
You have to install cmake on your target system. The minimum version required is 3.1.0
Home: http://www.cmake.org/
There are some global CMake options that you can use in Exiv2 :
-DCMAKE_INSTALL_PREFIX : decide where the program will be install on your computer.
-DCMAKE_BUILD_TYPE : decide which type of build you want. You can chose between:
"debugfull". : for hacking. Include all debug information.
"Debug".
"profile".
"relwithdebinfo" : default. use gcc -O2 -g options.
"Release" : generate stripped and optimized bin files. For packaging.
For knowing more about the specific Exiv2 CMake options, look into the main CMakeLists.txt file.
2 Building and Installing on UNIX-like systems
==================================
This process covers MacOS-X, Linux and Cygwin.
Run the following commands from the top directory (containing this
file) to configure, build and install the library and utilities:
$ mkdir build && cd build
$ cmake .. or cmake-gui ..
$ make -j
$ make install
Note that the CMake generator used by default on Unix is : 'Makefiles'. However you can chose others like 'Ninja'
To uninstall Exiv2, run:
$ make uninstall
3 Building and installing for Visual Studio Users
=================================================
exiv2 provides three build environment for users of Visual Studio:
cmake: This environment
msvc: 32 bit AND 64 bit build environment for MSVC 2005 and later (2005/2008/10/12/13/15)
msvc2003: 32 bit build environment for MSVC 2003 (deprecated after v0.26)
CMake doesn't build code. It generates build environments.
CMake is a language for describing builds and the CMake interpreter generates
the build environment for your system.
CMake generates MSVC .sln and .vcproj files for your target environment.
The files generated by CMake provide 4 configs: Debug|Release|RelWithDebInfo|MinSizeRel
The current architecture of CMake requires you to decide before running cmake:
1) The version of DevStudio
2) 32bit or 64 bit builds
3) Building static or shared libraries
We have two contributed CMake Build Environments:
1 contrib/cmake/msvc
Please read contrib/cmake/msvc/ReadMe.txt
2 contrib/build/msvc
The scripts require:
- Cygwin (in order to download all dependencies (zlib, expat, ssl, curl, ssh), including exiv2 trunk from svn)
- CMake
- SVN (optional)
Then
- put the two scripts (build.cmd and setenv.cmd) into a completely empty directory
- adapt the paths in setenv.cmd
- open the VS command line shell
- execute build.cmd (if there are any errors, the script should tell you)
Exiv2 should be packaged in the dist directory with all the .lib, include and binary files you need.
3 Running CMake commands manually from command line (new)
From Exiv2 0.26.0 to 0.26.1 the CMake code of the project was cleaned and now it is possible to configure
project from the command line as we do in the Unix sytems. As in the UNIX case, we can run the following
commands from the top directory to configure, build and install the library and utilities:
$ mkdir build && cd build
$ cmake .. or cmake-gui ..
$ make -j
$ make install
However there are some particularities on Windows that might cause the CMake command does not find
the compiler correctly.
Previous versions of Visual Studio were creating an environment variable (VSCOMNTOOLS140, for example) that
points at the compiler and other resources relevant to that version of the compiler. However in Visual Studio
2017, they do not do that anymore.
What we recommend is to call the vcvarsall.bat Visual Studio configuration script before running CMake.
For example, with Visual Studio 2017 installed on your system, you will need to run
$ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
Afterwards, CMake will identify correctly your Build Tools.
It is also important to note that the default CMake configuration assume the existence of some libraries
in your system. If they are not available, the configuration will fail. It is possible to disable some
features, or provide the paths to the INCLUDE folders, or libraries, at the moment of calling CMake the
first time.
In this example, we disable the NLS and PNG support, and we specify the path where we have the EXPAT library:
$ cmake -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_PNG=OFF -DCMAKE_PREFIX_PATH="C:\pathToExpat\ ../
CMake Generators
----------------
It is also important to note that the default CMake generator is 'Visual Studio' (The version will depend
on the vcvarsall.bat script called before running CMake).
If you are not a big fan of Visual Studio you can use other generators like: 'Ninja'. In order to use them
you just need to pass the option -GNinja at the moment of calling CMake for the first time:
$ cmake -GNinja -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_PNG=OFF -DCMAKE_PREFIX_PATH="C:\pathToExpat\ ../
Note: For using the Ninja generator you will need to have the ninja build system executable in your
$PATH. More info at https://ninja-build.org/.
4 Building and installing for MinGW Users
=========================================
CMake/MinGW has a number of serious issues. This will be reported to Kitware.
It is possible to use CMake/MinGW if you put in some effort. This is documented in TODO-CMAKE.
# That's all Folks
##