mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
111 lines
4.7 KiB
Text
111 lines
4.7 KiB
Text
|
|
||
|
Building Arabica with CMake
|
||
|
---------------------------
|
||
|
Prerequisite: CMake 2.8 has to be installed and has to be in the PATH
|
||
|
The file "CMakeLists.txt" has to be in the root directory of the Arabica project. On the same level as AUTHORS, COPYING etc .. .
|
||
|
|
||
|
|
||
|
How to build on Windows:
|
||
|
-----------------------
|
||
|
1. Change to arabica root directory
|
||
|
2. Create a temporary build directory: mkdir build
|
||
|
3. Change into the build directory: cd build
|
||
|
|
||
|
For a Visual Studio 2010 (32 bit) build do:
|
||
|
cmake -G "Visual Studio 2010" ..
|
||
|
A 32 bit solution "arabica.sln" will be generated in build.
|
||
|
|
||
|
For a Visual Studio 2010 (64 bit) build do:
|
||
|
cmake -G "Visual Studio 2010 Win64" ..
|
||
|
A 64 bit solution "arabica.sln" will be generated in build.
|
||
|
|
||
|
The default backend for a Windows build is MSXML.
|
||
|
To change the backend to EXPAT use:
|
||
|
|
||
|
cmake -D ARABICA_XML_BACKEND=USE_EXPAT -G "Visual Studio 2010" ..
|
||
|
A 32 bit solution "arabica.sln" using expat backend will be generated in build.
|
||
|
|
||
|
|
||
|
How to build on Linux:
|
||
|
-----------------------
|
||
|
1. Change to arabica root directory
|
||
|
2. Create a temporary build directory: mkdir build
|
||
|
3. Change into the build directory: cd build
|
||
|
|
||
|
For a Makefile build do:
|
||
|
cmake ..
|
||
|
A Makefile for arabica will be generated. (default using expat)
|
||
|
|
||
|
cmake -D ARABICA_XML_BACKEND=USE_LIBXML2 ..
|
||
|
A Makefile for arabica usng libcml2 will be generated.
|
||
|
|
||
|
|
||
|
|
||
|
Advanced options:
|
||
|
----------------
|
||
|
Build arabica only without examples:
|
||
|
cmake -D BUILD_ARABICA_EXAMPLES=OFF ..
|
||
|
|
||
|
|
||
|
|
||
|
Problems:
|
||
|
--------
|
||
|
Boost was not found:
|
||
|
-------------------
|
||
|
Give the path to BOOST_ROOT using commandline:
|
||
|
cmake -DBOOST_ROOT=C:/BOOST ..
|
||
|
|
||
|
|
||
|
No find_package(XercesC)?
|
||
|
------------------------
|
||
|
There is no official FindXercesC.cmake script in the CMake distribution. If needed I can send you the
|
||
|
one I have written for our project.
|
||
|
|
||
|
Which other worskspaces can be generated by cmake?
|
||
|
-------------------------------------------------
|
||
|
Just run cmake without options and look at the list of available generators:
|
||
|
On Windows:
|
||
|
The following generators are available on this platform:
|
||
|
Borland Makefiles = Generates Borland makefiles.
|
||
|
MSYS Makefiles = Generates MSYS makefiles.
|
||
|
MinGW Makefiles = Generates a make file for use with
|
||
|
mingw32-make.
|
||
|
NMake Makefiles = Generates NMake makefiles.
|
||
|
NMake Makefiles JOM = Generates JOM makefiles.
|
||
|
Ninja = Generates build.ninja files (experimental).
|
||
|
Unix Makefiles = Generates standard UNIX makefiles.
|
||
|
Visual Studio 10 = Generates Visual Studio 10 project files.
|
||
|
Visual Studio 10 IA64 = Generates Visual Studio 10 Itanium project
|
||
|
files.
|
||
|
Visual Studio 10 Win64 = Generates Visual Studio 10 Win64 project
|
||
|
files.
|
||
|
Visual Studio 11 = Generates Visual Studio 11 project files.
|
||
|
Visual Studio 11 ARM = Generates Visual Studio 11 ARM project files.
|
||
|
Visual Studio 11 Win64 = Generates Visual Studio 11 Win64 project
|
||
|
files.
|
||
|
Visual Studio 6 = Generates Visual Studio 6 project files.
|
||
|
Visual Studio 7 = Generates Visual Studio .NET 2002 project
|
||
|
files.
|
||
|
Visual Studio 7 .NET 2003 = Generates Visual Studio .NET 2003 project
|
||
|
files.
|
||
|
Visual Studio 8 2005 = Generates Visual Studio .NET 2005 project
|
||
|
files.
|
||
|
Visual Studio 8 2005 Win64 = Generates Visual Studio .NET 2005 Win64
|
||
|
project files.
|
||
|
Visual Studio 9 2008 = Generates Visual Studio 9 2008 project files.
|
||
|
Visual Studio 9 2008 IA64 = Generates Visual Studio 9 2008 Itanium
|
||
|
project files.
|
||
|
Visual Studio 9 2008 Win64 = Generates Visual Studio 9 2008 Win64 project
|
||
|
files.
|
||
|
Watcom WMake = Generates Watcom WMake makefiles.
|
||
|
CodeBlocks - MinGW Makefiles= Generates CodeBlocks project files.
|
||
|
CodeBlocks - NMake Makefiles= Generates CodeBlocks project files.
|
||
|
CodeBlocks - Ninja = Generates CodeBlocks project files.
|
||
|
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
|
||
|
Eclipse CDT4 - MinGW Makefiles
|
||
|
= Generates Eclipse CDT 4.0 project files.
|
||
|
Eclipse CDT4 - NMake Makefiles
|
||
|
= Generates Eclipse CDT 4.0 project files.
|
||
|
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
|
||
|
Eclipse CDT4 - Unix Makefiles
|
||
|
= Generates Eclipse CDT 4.0 project files.
|