chore(README): show how to use engine in a cmake project
This commit is contained in:
parent
557d106428
commit
df2036bd0e
24
README.md
24
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)
|
||||
(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)
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user