From cf3888d7349ba3d3f832a6d8b45a87ed294b95ac Mon Sep 17 00:00:00 2001 From: Felipe Munoz Mazur <36215582+FMMazur@users.noreply.github.com> Date: Fri, 27 Mar 2020 00:12:47 -0400 Subject: [PATCH] Update README.md Document CMake Usage and Project Example --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 5243140..8a6e634 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,29 @@ The types used are actually unions that allow access to the same data multiple w ## Build +### CMake (All platforms) +```bash +$ mkdir build +$ cd build +$ cmake .. # [Optional] -DCGLM_SHARED=ON +$ make +$ sudo make install # [Optional] +``` + +#### Use with your CMake project +* Example: +```cmake +cmake_minimum_required(VERSION 3.8.2) + +project() + +add_executable(${PROJECT_NAME} src/main.c) +target_link_libraries(${LIBRARY_NAME} PRIVATE + cglm) + +add_subdirectory(external/cglm/) +``` + ### Unix (Autotools) ```bash