From 5bfd0d2122666576d48eaab259404db154c6becf Mon Sep 17 00:00:00 2001 From: anggape Date: Mon, 16 May 2022 10:58:23 +0700 Subject: [PATCH 1/2] cmake: Generate compile commands --- projects/CMake/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt index 580ecfed2b6a..12af1c543b1a 100644 --- a/projects/CMake/CMakeLists.txt +++ b/projects/CMake/CMakeLists.txt @@ -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 From e43b4625f5ec47982d96add029c9c35d93521532 Mon Sep 17 00:00:00 2001 From: anggape Date: Mon, 16 May 2022 11:01:32 +0700 Subject: [PATCH 2/2] Update README.md simplify build process --- projects/CMake/README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/CMake/README.md b/projects/CMake/README.md index 402d3170c808..f7873c30f930 100644 --- a/projects/CMake/README.md +++ b/projects/CMake/README.md @@ -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: ``` bash -mkdir build -cd build -cmake .. -make +cmake -B build +cmake --build build ``` ### Web