Skip to content
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

Added CMakePresets.json file. #1089

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

j-horner
Copy link
Contributor

@j-horner j-horner commented May 1, 2021

Allows easy build with Visual Studio - CMake integration.
Debug and Release configurations added.
installRoot set to build/install/

Allows easy build with Visual Studio - CMake integration.
Debug and Release configurations added.
installRoot set to `build/install/`
@ensiform
Copy link
Member

ensiform commented May 2, 2021

Curious why only x64 builds when the preferred for windows builds is 32?

@j-horner
Copy link
Contributor Author

j-horner commented May 2, 2021

Partly personal habit of just building x64 and partly because I didn't realise 32 was the preferred.

I'll add x86 and some RelWithDebInfo configurations too.

@ensiform
Copy link
Member

ensiform commented May 2, 2021

Partly personal habit of just building x64 and partly because I didn't realise 32 was the preferred.

I'll add x86 and some RelWithDebInfo configurations too.

Just because there are no mods for 64-bit out there, and many people still play old mods like JA+, 64-bit is unavailable for them.
Also, it adds no benefit to JKA engine to do so.

Copy link
Member

@xycaleth xycaleth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on the fence about approving this since we've so far managed to not have any text editor or IDE specific files in the repo :/

j-horner and others added 4 commits May 15, 2021 20:21
Provides equivalent functionality.
Can be used directly with CMake and is not MSVC specific.
Removed whitespace from names and reduced verbosity.
Added CMakeUserPresets.json to .gitignore
Added simple CMakeUserPresets.json template for devs to copy.
@j-horner j-horner changed the title Added CMakeSettings.json file. Added CMakePresets.json file. May 15, 2021
@j-horner
Copy link
Contributor Author

j-horner commented May 15, 2021

we've so far managed to not have any text editor or IDE specific files in the repo

That's understandable. I was going to close the PR but I saw that CMake added a new feature called Presets, which is basically the sort of JSON file except that it can be parsed by CMake directly and isn't IDE specific.

https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#build-preset

I added some x86 configurations and it seems to work well with VS code. VS only supports it under preview at the moment so I haven't test that. I'm not sure about other IDEs.

CMakeUserPresets.json is apparently intended for local developer settings so I added it to .gitignore and made a simple template for overriding CMAKE_INSTALL_PREFIX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants