Source

expat / CMake.README

== How to build expat with cmake (experimental) ==

The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual 
Studio) and should work on all other platform cmake supports.

Assuming ~/expat-2.1.0 is the source directory of expat, add a subdirectory
build and change into that directory:
~/expat-2.1.0$ mkdir build && cd build
~/expat-2.1.0/build$

From that directory, call cmake first, then call make, make test and 
make install in the usual way:
~/expat-2.1.0/build$ cmake ..
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
....
-- Configuring done
-- Generating done
-- Build files have been written to: /home/patrick/expat-2.1.0/build

If you want to specify the install location for your files, append 
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.

~/expat-2.1.0/build$ make && make test && make install
Scanning dependencies of target expat
[  5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
....
-- Installing: /usr/local/lib/pkgconfig/expat.pc
-- Installing: /usr/local/bin/xmlwf
-- Installing: /usr/local/share/man/man1/xmlwf.1

For Windows builds, you must make sure to call cmake from an environment where 
your compiler is reachable, that means either you call it from the 
Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
make sure that gcc can be called. On Windows, you also might want to specify a 
special Generator for CMake:
for Visual Studio builds do: 
cmake .. -G "Visual Studio 10" && vcexpress expat.sln
for mingw builds do: 
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install 
    && gmake && gmake install
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.