-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I also experimented with more detailed, platform-dependent presets, but found that it is not really that useful. In particular, we want users themselves to use whichever compilers and generators they want to rather than to constrain the choices. We strive to be agnostict toward both generators and platforms. This way, we we can also give more common build instructions regardless of platform. Furthermore, choosing not to add compiler-specific flags to the presets as discussed in this previous commit: ee9d7f4 "Add common target options to cmake libraries and executables". Also tested with making presets for e.g. vcpkg and mingw toolchains. However, this doesn't really make sense in presets. First of all, the choice of such a toolchain is not mutually exclusive with the current presets, so we would have to replicate most of them for each toolchain we wanted to support. Further, the exact specifics of these toolcahins, like version, platform, install location, and so on, is very specific to each case. Thus, if we wanted to handle these it would create additional dimensions to the presets, and we'd end up with a huge list of similar presets we would have to mainatain and which users would have to choose from. Or alternatively, users would have to provide a lot of their setup in any case, thereby dismissing some of the initially considered usefulness. Instead, many tools already allow you to setup a toolchain first which can then be used with a given preset. Thus, making the choice of toolchains and cmake presets orthogonal makes a lot more sense. One unfortunate issue from a user-friendliness perspective is that the cmake gui doesn't allow you to select a preset without a specified generator. There's an issue for this here: https://gitlab.kitware.com/cmake/cmake/-/issues/23341 I figured accepting this for now is better than duplicating all our presets to specify different generators. But the situations is not ideal, hopefully it will be fixed soon.
- Loading branch information
Showing
5 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
set(RMLUI_AVAILABLE_SAMPLES_BACKENDS | ||
"auto" | ||
"native" | ||
"Win32_GL2" | ||
"Win32_VK" | ||
"X11_GL2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"version": 3, | ||
"configurePresets": [ | ||
{ | ||
"name": "samples", | ||
"cacheVariables": { | ||
"RMLUI_SAMPLES": true | ||
} | ||
}, | ||
{ | ||
"name": "samples-all", | ||
"inherits": "samples", | ||
"cacheVariables": { | ||
"RMLUI_LOTTIE_PLUGIN": true, | ||
"RMLUI_SVG_PLUGIN": true, | ||
"RMLUI_LUA_BINDINGS": true | ||
} | ||
}, | ||
{ | ||
"name": "standalone", | ||
"cacheVariables": { | ||
"RMLUI_SAMPLES": true, | ||
"RMLUI_FONT_ENGINE": "none", | ||
"RMLUI_SAMPLES_BACKEND": "native" | ||
} | ||
}, | ||
{ | ||
"name": "dev", | ||
"installDir": "Install", | ||
"cacheVariables": { | ||
"RMLUI_SAMPLES": true, | ||
"BUILD_TESTING": true, | ||
"BUILD_SHARED_LIBS": false | ||
}, | ||
"warnings": { | ||
"dev": true | ||
}, | ||
"errors": { | ||
"dev": true | ||
} | ||
}, | ||
{ | ||
"name": "dev-all", | ||
"inherits": "dev", | ||
"cacheVariables": { | ||
"RMLUI_LOTTIE_PLUGIN": true, | ||
"RMLUI_SVG_PLUGIN": true, | ||
"RMLUI_LUA_BINDINGS": true | ||
} | ||
}, | ||
{ | ||
"name": "ci", | ||
"cacheVariables": { | ||
"RMLUI_WARNINGS_AS_ERRORS": true | ||
} | ||
} | ||
] | ||
} |