From df2036bd0eea5cb6ed0ce2b818cf54fa28ce3f02 Mon Sep 17 00:00:00 2001 From: illyum Date: Sun, 15 Sep 2024 01:48:14 -0600 Subject: [PATCH] chore(README): show how to use engine in a cmake project --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fe941f..9f8db4c 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,26 @@ info [on this stack overflow post](https://stackoverflow.com/questions/57300495/ ## Building Find more info about building the project in the `docs/Building.md` file. -(CMake >= 3.28) \ No newline at end of file +(CMake >= 3.28) + +# Using the engine as a library +You're more than welcome to use this engine for your game. The recommended way to build the project is using CMake: + +### Fetch Content: +```cmake +# Enable FetchContent module +include(FetchContent) + +# Fetch the external repository +FetchContent_Declare( + ICEngine + GIT_REPOSITORY http://proudcricle:3001/illyum/ICEngine.git + GIT_TAG main +) + +# Then add your sources and executable +add_executable(MyGame main.cpp) + +# Link the ICEngine library to your project +target_link_libraries(MyGame PRIVATE ICEngine) +``` \ No newline at end of file