Skip to content

Commit

Permalink
Cleaner presets for CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cohen committed Jan 2, 2024
1 parent 3ebec35 commit 9d479ab
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
44 changes: 39 additions & 5 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,42 @@
"configurePresets": [
{
"name": "default",
"displayName": "Default Config",
"displayName": "Default Config from CMakeLists.txt",
"description": "Default building parameters",
"cacheVariables": {
"WITH_AOM_DECODER" : "ON",
"WITH_AOM_DECODER_PLUGIN" : "OFF",
"WITH_AOM_ENCODER" : "ON",
"WITH_AOM_ENCODER_PLUGIN" : "OFF",
"WITH_DAV1D" : "OFF",
"WITH_DAV1D_PLUGIN" : "ON",
"WITH_LIBDE265" : "ON",
"WITH_LIBDE265_PLUGIN" : "OFF",
"WITH_RAV1E" : "OFF",
"WITH_RAV1E_PLUGIN" : "ON",
"WITH_SvtEnc" : "OFF",
"WITH_SvtEnc_PLUGIN" : "ON",
"WITH_X265" : "ON",
"WITH_X265_PLUGIN" : "OFF",
"WITH_JPEG_DECODER" : "OFF",
"WITH_JPEG_DECODER_PLUGIN" : "OFF",
"WITH_JPEG_ENCODER" : "OFF",
"WITH_JPEG_ENCODER_PLUGIN" : "OFF",
"WITH_UNCOMPRESSED_CODEC" : "OFF",
"WITH_KVAZAAR" : "OFF",
"WITH_KVAZAAR_PLUGIN" : "OFF",
"WITH_OpenJPEG_DECODER" : "OFF",
"WITH_OpenJPEG_DECODER_PLUGIN" : "ON",
"WITH_OpenJPEG_ENCODER" : "OFF",
"WITH_OpenJPEG_ENCODER_PLUGIN" : "ON",
"WITH_FFMPEG_DECODER" : "OFF",
"WITH_FFMPEG_DECODER_PLUGIN" : "OFF"
}
},
{
"name": "base",
"displayName": "Base Config",
"description": "Default base building parameters",
"cacheVariables": {
"WITH_AOM_DECODER" : "ON",
"WITH_AOM_DECODER_PLUGIN" : "ON",
Expand Down Expand Up @@ -42,7 +76,7 @@
},
{
"name": "develop",
"inherits": "default",
"inherits": "base",
"displayName": "development",
"description": "Enable all experimental features. Do not use plugins, compile everything built-in.",
"cacheVariables": {
Expand Down Expand Up @@ -73,7 +107,7 @@
},
{
"name": "release",
"inherits": "default",
"inherits": "base",
"displayName": "Standard release build",
"description": "Recommended parameters for a release build.",
"cacheVariables": {
Expand Down Expand Up @@ -112,7 +146,7 @@
},
{
"name": "testing",
"inherits": "default",
"inherits": "base",
"displayName": "Tests",
"description": "For running the tests",
"cacheVariables": {
Expand All @@ -124,7 +158,7 @@
},
{
"name": "fuzzing",
"inherits": "default",
"inherits": "base",
"displayName": "Fuzzing",
"description": "For running the fuzzers",
"cacheVariables": {
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ There are CMake presets to cover the most frequent use cases.
* `testing`: for building and executing the unit tests. Also the internal library symbols are exposed. Do not use for distribution.
* `fuzzing`: similar to `testing`, this builds the fuzzers. The library should not distributed.

Please note that the `default` preset mirrors the default options set in the CMakeLists.txt file.
This means that running `cmake --presets=default ..` is essentially equivalent to running `cmake ..` without using any presets.

You can optionally adapt these standard configurations to your needs.
This can be done, for example, by calling `ccmake .` from within the `build` directory.

Expand Down

0 comments on commit 9d479ab

Please sign in to comment.