summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLuca Sas <sas.luca.alex@gmail.com>2020-11-19 12:54:15 +0000
committerGitHub <noreply@github.com>2020-11-19 12:54:15 +0000
commiteebaddf29efad9bc7b82d8745d839931f08ef887 (patch)
tree4fd2433e224d70029ab8f55e640a9136f5267b2b /README.md
parent6bcb1207addb4afe041c94e68e23c77175164956 (diff)
downloadgamejam-slgj-2024-eebaddf29efad9bc7b82d8745d839931f08ef887.tar.gz
gamejam-slgj-2024-eebaddf29efad9bc7b82d8745d839931f08ef887.tar.bz2
gamejam-slgj-2024-eebaddf29efad9bc7b82d8745d839931f08ef887.zip
Update README.md to explain how to support C++
Diffstat (limited to 'README.md')
-rw-r--r--README.md24
1 files changed, 23 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1dd0e0d..126e027 100644
--- a/README.md
+++ b/README.md
@@ -8,4 +8,26 @@ Building from the cmake file will build both raylib and `src/main.c` which inclu
The example in `src/main.c` uses an example image located in the `assets` folder.
-The absolute path to the assets folder is defined by a macro `ASSETS_PATH` in the CMake file automatically which is useful during development. If you plan on releasing or sharing your game consider manually setting the value of the `ASSETS_PATH` macro. \ No newline at end of file
+The absolute path to the assets folder is defined by a macro `ASSETS_PATH` in the CMake file automatically which is useful during development. If you plan on releasing or sharing your game consider manually setting the value of the `ASSETS_PATH` macro.
+
+## How to use with C++
+To use with C++ simply rename `main.c` to `main.cpp` and then change the following lines in CMakelists.txt:
+
+From:
+```
+project(raylib_template C)
+
+set(CMAKE_C_STANDARD 99)
+
+add_executable(raylib_template src/main.c)
+```
+
+To:
+```
+project(raylib_template CXX)
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+add_executable(raylib_template src/main.cpp)
+```