mame/3rdparty/expat/CMake.README

43 lines
1.7 KiB
Text
Raw Normal View History

2015-01-10 11:59:27 +01:00
== How to build expat with cmake (experimental) ==
The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
2015-01-10 11:59:27 +01:00
Studio) and should work on all other platform cmake supports.
Assuming ~/expat-2.2.10 is the source directory of expat, add a subdirectory
2015-01-10 11:59:27 +01:00
build and change into that directory:
~/expat-2.2.10$ mkdir build && cd build
~/expat-2.2.10/build$
2015-01-10 11:59:27 +01:00
From that directory, call cmake first, then call make, make test and
2015-01-10 11:59:27 +01:00
make install in the usual way:
~/expat-2.2.10/build$ cmake ..
2015-01-10 11:59:27 +01:00
-- 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.2.10/build
2015-01-10 11:59:27 +01:00
If you want to specify the install location for your files, append
2015-01-10 11:59:27 +01:00
-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
~/expat-2.2.10/build$ make && make test && make install
2015-01-10 11:59:27 +01:00
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
2015-01-10 11:59:27 +01:00
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
2015-01-10 11:59:27 +01:00
special Generator for CMake:
for Visual Studio builds do:
cmake .. -G "Visual Studio 15 2017" && msbuild /m expat.sln
for mingw builds do:
cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
2015-01-10 11:59:27 +01:00
&& gmake && gmake install