浏览代码

generate compile_commands.json to be used by language server (#2481)

* cmake: Generate compile commands

* Update README.md

simplify build process
pull/2485/head
Angga Permana 2 年前
committed by GitHub
父节点
当前提交
d3caee0e72
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. +3
    -0
      projects/CMake/CMakeLists.txt
  2. +2
    -4
      projects/CMake/README.md

+ 3
- 0
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

+ 2
- 4
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

正在加载...
取消
保存