CMake.README 1.7 KB

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