-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CMake preset and VSCode support #61
Conversation
With this we are now able to open this project in VSCode and QtCreator and other IDEs that support CMakePresets. Add launch.json can can be further edited to also launch godot editor Add tasks.json for the build step. This can also be used in combination with TaskRunner https://marketplace.visualstudio.com/items?itemName=SanaAjani.taskrunnercode for on click tasks (like formatting or custom deploy scripts). I use this extensivly in ScreenPlay see https://gitlab.com/kelteseth/ScreenPlay/-/blob/master/.vscode/tasks.json?ref_type=heads Add godot.natvis for better debugger support Add extensions.json that recommends cmake and cpp support for now. We maybe should also add godot related extentions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Elias!
I tried using VSCode at one point but found it too messy with all the config and the way you run stuff, so I went back to Qt Creator.
I haven't used CMake presets before. I looked at them when they were released, but there were too many issues. I would guess they've sorted them out by now, so that's a good addition.
Are you willing to answer questions/fix this stuff when it breaks? 😄
Sure! I'm away for the weekend so I will report back Sunday 👍 |
Ready :) |
This still looks like it's build/launch only for debug. Don't we need build presets and launch targets for release builds too? |
I'm currently on vacation for the next two weeks, I will look into it afterwards :) |
No problem at all. Have an amazing break! |
Change binary dir path to use same folder name as Godot for os and inset project name into folder name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Elias!
This can still be improved. I'm currently using an altered version for my personal project ScreenPlay (Godot desktop wallpaper) here https://gitlab.com/kelteseth/ScreenPlay/-/merge_requests/108 For example, not sure if we need the launch.json because there is nothing to launch when running the project, because this only compiles the library. This still can be altered to include the Godot editor to start the project. Also in ScreenPlay I embed the project and explicitly set the build folder to my Godot project |
With this we are now able to open this project in VSCode and QtCreator and other IDEs that support CMakePresets. No laborious setup required.
6S2ubHsZg5.mp4
This is a MVP MR. We easily can add more features like VCPKG support with a few lines.