mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-27 16:49:09 +00:00
generate compile_commands.json to be used by language server (#2481)
* cmake: Generate compile commands * Update README.md simplify build process
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 3.11) # FetchContent is available in 3.11+
|
cmake_minimum_required(VERSION 3.11) # FetchContent is available in 3.11+
|
||||||
project(example)
|
project(example)
|
||||||
|
|
||||||
|
# Generate compile_commands.json
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
find_package(raylib 4.0.0 QUIET) # QUIET or REQUIRED
|
find_package(raylib 4.0.0 QUIET) # QUIET or REQUIRED
|
||||||
if (NOT raylib_FOUND) # If there's none, fetch and build raylib
|
if (NOT raylib_FOUND) # If there's none, fetch and build raylib
|
||||||
|
|||||||
@@ -11,10 +11,8 @@ To compile the example, use one of the following dependending on your build targ
|
|||||||
Use the following to build for desktop:
|
Use the following to build for desktop:
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
mkdir build
|
cmake -B build
|
||||||
cd build
|
cmake --build build
|
||||||
cmake ..
|
|
||||||
make
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Web
|
### Web
|
||||||
|
|||||||
Reference in New Issue
Block a user