build.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Building cglm
  2. ================================
  3. | **cglm** does not have external dependencies except for unit testing.
  4. | When you pulled cglm repo with submodules all dependencies will be pulled too.
  5. | `build-deps.sh` will pull all dependencies/submodules and build for you.
  6. External dependencies:
  7. * cmocka - for unit testing
  8. **NOTE:**
  9. If you only need to inline versions, you don't need to build **cglm**, you don't need to link it to your program.
  10. Just import cglm to your project as dependency / external lib by copy-paste then use it as usual
  11. **Unix (Autotools):**
  12. .. code-block:: bash
  13. :linenos:
  14. $ sh ./build-deps.sh # run this only once (dependencies)
  15. $ sh autogen.sh
  16. $ ./configure
  17. $ make
  18. $ make check # run tests (optional)
  19. $ [sudo] make install # install to system (optional)
  20. **make** will build cglm to **.libs** sub folder in project folder.
  21. If you don't want to install cglm to your system's folder you can get static and dynamic libs in this folder.
  22. **Build dependencies (windows):**
  23. Windows related build files, project files are located in win folder,
  24. make sure you are inside in cglm/win folder.
  25. Code Analysis are enabled, it may take awhile to build.
  26. .. code-block:: bash
  27. :linenos:
  28. $ cd win
  29. $ .\build.bat
  30. if *msbuild* is not worked (because of multi versions of Visual Studio)
  31. then try to build with *devenv*:
  32. .. code-block:: bash
  33. :linenos:
  34. $ devenv cglm.sln /Build Release
  35. Currently tests are not available on Windows.