build.rst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Build cglm
  2. ================================
  3. | **cglm** does not have any external dependencies.
  4. **NOTE:**
  5. If you only need to inline versions, you don't need to build **cglm**, you don't need to link it to your program.
  6. Just import cglm to your project as dependency / external lib by copy-paste then use it as usual
  7. Unix (Autotools):
  8. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  9. .. code-block:: bash
  10. :linenos:
  11. $ sh autogen.sh
  12. $ ./configure
  13. $ make
  14. $ make check # run tests (optional)
  15. $ [sudo] make install # install to system (optional)
  16. **make** will build cglm to **.libs** sub folder in project folder.
  17. If you don't want to install **cglm** to your system's folder you can get static and dynamic libs in this folder.
  18. Windows (MSBuild):
  19. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  20. Windows related build files, project files are located in `win` folder,
  21. make sure you are inside in cglm/win folder.
  22. Code Analysis are enabled, it may take awhile to build.
  23. .. code-block:: bash
  24. :linenos:
  25. $ cd win
  26. $ .\build.bat
  27. if *msbuild* is not worked (because of multi versions of Visual Studio)
  28. then try to build with *devenv*:
  29. .. code-block:: bash
  30. :linenos:
  31. $ devenv cglm.sln /Build Release
  32. Currently tests are not available on Windows.
  33. Documentation (Sphinx):
  34. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  35. **cglm** uses sphinx framework for documentation, it allows lot of formats for documentation. To see all options see sphinx build page:
  36. https://www.sphinx-doc.org/en/master/man/sphinx-build.html
  37. Example build:
  38. .. code-block:: bash
  39. :linenos:
  40. $ cd cglm/docs
  41. $ sphinx-build source build