cmake: Generate compile commands

This commit is contained in:
anggape 2022-05-16 10:58:23 +07:00
parent 020e903193
commit 5bfd0d2122
No known key found for this signature in database
GPG Key ID: F5E32DF816575480

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