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:
Angga Permana 2022-05-19 18:18:12 +07:00 committed by GitHub
parent 6259dc4121
commit d3caee0e72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.11) # FetchContent is available in 3.11+
project(example)
# Generate compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Dependencies
find_package(raylib 4.0.0 QUIET) # QUIET or REQUIRED
if (NOT raylib_FOUND) # If there's none, fetch and build raylib