]>
Commit | Line | Data |
---|---|---|
11a3e7b6 VZ |
1 | == How to build expat with cmake (experimental) ==\r |
2 | \r | |
3 | The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual \r | |
4 | Studio) and should work on all other platform cmake supports.\r | |
5 | \r | |
6 | Assuming ~/expat-2.1.0 is the source directory of expat, add a subdirectory\r | |
7 | build and change into that directory:\r | |
8 | ~/expat-2.1.0$ mkdir build && cd build\r | |
9 | ~/expat-2.1.0/build$\r | |
10 | \r | |
11 | From that directory, call cmake first, then call make, make test and \r | |
12 | make install in the usual way:\r | |
13 | ~/expat-2.1.0/build$ cmake ..\r | |
14 | -- The C compiler identification is GNU\r | |
15 | -- The CXX compiler identification is GNU\r | |
16 | ....\r | |
17 | -- Configuring done\r | |
18 | -- Generating done\r | |
19 | -- Build files have been written to: /home/patrick/expat-2.1.0/build\r | |
20 | \r | |
21 | If you want to specify the install location for your files, append \r | |
22 | -DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.\r | |
23 | \r | |
24 | ~/expat-2.1.0/build$ make && make test && make install\r | |
25 | Scanning dependencies of target expat\r | |
26 | [ 5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o\r | |
27 | [ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o\r | |
28 | ....\r | |
29 | -- Installing: /usr/local/lib/pkgconfig/expat.pc\r | |
30 | -- Installing: /usr/local/bin/xmlwf\r | |
31 | -- Installing: /usr/local/share/man/man1/xmlwf.1\r | |
32 | \r | |
33 | For Windows builds, you must make sure to call cmake from an environment where \r | |
34 | your compiler is reachable, that means either you call it from the \r | |
35 | Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and\r | |
36 | make sure that gcc can be called. On Windows, you also might want to specify a \r | |
37 | special Generator for CMake:\r | |
38 | for Visual Studio builds do: \r | |
39 | cmake .. -G "Visual Studio 10" && vcexpress expat.sln\r | |
40 | for mingw builds do: \r | |
41 | cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install \r | |
42 | && gmake && gmake install\r |