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

185 lines
7.6 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.
a) From the command line
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
Specific Exiv2 options :
-DBUILD_SHARED_LIBS : CMake variable controlling whether exiv2lib is build as a shared library (dll). [default=on]
-DEXIV2_ENABLE_XMP : Build with XMP metadata support. [default=on ]
-DEXIV2_ENABLE_LIBXMP : Build a static convenience Library for XMP. [default=on ]
-DEXIV2_ENABLE_PNG : Build with png support (requires libz). [default=on ]
-DEXIV2_ENABLE_NLS : Build native language support (requires gettext). [default=on ]
-DEXIV2_ENABLE_PRINTUCS2 : Build with Printucs2. [default=on ]
-DEXIV2_ENABLE_LENSDATA : Build including lens data. [default=on ]
-DEXIV2_ENABLE_COMMERCIAL : Build with the EXV_COMMERCIAL_VERSION symbol set. [default=off]
-DEXIV2_ENABLE_BUILD_SAMPLES : Build the unit tests. [default=off]
-DEXIV2_ENABLE_BUILD_PO : Build translations files. [default=off]
-DEXIV2_ENABLE_CURL : USE Libcurl for HttpIo [default=off]
-DEXIV2_ENABLE_SSH : USE Libssh for SshIo [default=off]
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
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
The only pre-requisite is to have called before the vcvarsall.bat Visual Studio configuration
script. 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"
Before running CMake. If you do not do it, CMake will not be able to determine your compiler.
It is also important to note that the default CMake configuration for Windows enable some features
making use of libraries that probably will not be available in your system. It is possible to
disable some features, or provide the paths to the INCLUDE folders, or libraries, at the moment of
calling CMake. 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\ ../
or
$ 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
##