diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b4d8c35 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools" +} \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json index 006599a..cc123b1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -10,16 +10,17 @@ "name": "default", "displayName": "default", "description": "Default preset that are inherited by all", - "generator": "Ninja Multi-Config", + "generator": "Ninja", "hidden": true, "cacheVariables": { "CMAKE_INSTALL_PREFIX": "${sourceDir}/demo/addons" } }, { - "name": "windows", + "name": "windows-mc", "displayName": "64bit Windows Multi-Config", "inherits": "default", + "generator": "Ninja Multi-Config", "binaryDir": "${sourceDir}/build/Windows-AMD64", "condition": { "type": "equals", @@ -36,7 +37,8 @@ }, "cacheVariables": { "CMAKE_C_COMPILER": "cl.exe", - "CMAKE_CXX_COMPILER": "cl.exe" + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_BUILD_TYPE": "Debug" } }, { diff --git a/README.md b/README.md index 58c267b..f2d57e5 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ This tells CMake to use `Ninja` generator. There is a list of generators [on the **Note:** Even for multi-config generators you still have to specify `CMAKE_BUILD_TYPE`, because of the way [godot-cpp](https://github.com/godotengine/godot-cpp)'s build process is set up, hence there is not much use for this type of generators now. +Additionally, basic VSCode configuration files are provided, including launch configuration to debug the extension and `CMakePresets.json` for easier build system configuration (Configured for `Ninja`). + +Presets can also be used from command-line like so: +```sh +$ cmake +``` + #### Run demo project in Godot Editor ```sh