Skip to content

Commit

Permalink
cmake: remove 'base'/'default' configurations from presets (#1087)
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Jan 7, 2024
1 parent 725ac31 commit 98b987f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 84 deletions.
141 changes: 61 additions & 80 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,60 @@
},
"configurePresets": [
{
"name": "default",
"displayName": "Default Config from CMakeLists.txt",
"description": "Default building parameters",
"name": "develop",
"displayName": "development",
"description": "Enable all experimental features. Do not use plugins, compile everything built-in.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"BUILD_SHARED_LIBS": "ON",
"BUILD_TESTING" : "ON",

"ENABLE_PLUGIN_LOADING" : "OFF",
"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_DAV1D" : "ON",
"WITH_DAV1D_PLUGIN" : "OFF",
"WITH_LIBDE265" : "ON",
"WITH_LIBDE265_PLUGIN" : "OFF",
"WITH_RAV1E" : "OFF",
"WITH_RAV1E_PLUGIN" : "ON",
"WITH_SvtEnc" : "OFF",
"WITH_SvtEnc_PLUGIN" : "ON",
"WITH_RAV1E" : "ON",
"WITH_RAV1E_PLUGIN" : "OFF",
"WITH_SvtEnc" : "ON",
"WITH_SvtEnc_PLUGIN" : "OFF",
"WITH_X265" : "ON",
"WITH_X265_PLUGIN" : "OFF",
"WITH_JPEG_DECODER" : "OFF",
"WITH_JPEG_DECODER" : "ON",
"WITH_JPEG_DECODER_PLUGIN" : "OFF",
"WITH_JPEG_ENCODER" : "OFF",
"WITH_JPEG_ENCODER" : "ON",
"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"
"WITH_UNCOMPRESSED_CODEC" : "ON",
"WITH_KVAZAAR" : "ON",
"WITH_KVAZAAR_PLUGIN" : "OFF",
"WITH_OpenJPEG_DECODER" : "ON",
"WITH_OpenJPEG_DECODER_PLUGIN" : "OFF",
"WITH_OpenJPEG_ENCODER" : "ON",
"WITH_OpenJPEG_ENCODER_PLUGIN" : "OFF",
"WITH_FFMPEG_DECODER" : "ON",
"WITH_FFMPEG_DECODER_PLUGIN" : "OFF",

"WITH_REDUCED_VISIBILITY" : "OFF",
"WITH_DEFLATE_HEADER_COMPRESSION" : "ON",
"WITH_LIBSHARPYUV" : "ON",
"WITH_EXAMPLES": "ON",
"WITH_FUZZERS": "OFF"
}
},
{
"name": "base",
"displayName": "Base Config",
"description": "Default base building parameters",
"name": "release",
"displayName": "Standard release build",
"description": "Recommended parameters for a release build.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_SHARED_LIBS": "ON",
"BUILD_TESTING" : "OFF",

"ENABLE_PLUGIN_LOADING" : "ON",
"WITH_AOM_DECODER" : "ON",
"WITH_AOM_DECODER_PLUGIN" : "ON",
"WITH_AOM_ENCODER" : "ON",
Expand All @@ -64,56 +80,15 @@
"WITH_JPEG_ENCODER" : "ON",
"WITH_JPEG_ENCODER_PLUGIN" : "ON",
"WITH_UNCOMPRESSED_CODEC" : "ON",
"WITH_KVAZAAR" : "ON",
"WITH_KVAZAAR_PLUGIN" : "ON",
"WITH_OpenJPEG_DECODER" : "ON",
"WITH_OpenJPEG_DECODER_PLUGIN" : "ON",
"WITH_OpenJPEG_ENCODER" : "ON",
"WITH_OpenJPEG_ENCODER_PLUGIN" : "ON",
"WITH_FFMPEG_DECODER" : "ON",
"WITH_FFMPEG_DECODER_PLUGIN" : "ON"
}
},
{
"name": "develop",
"inherits": "base",
"displayName": "development",
"description": "Enable all experimental features. Do not use plugins, compile everything built-in.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"BUILD_SHARED_LIBS": "ON",
"BUILD_TESTING" : "ON",
"ENABLE_PLUGIN_LOADING" : "OFF",
"WITH_AOM_DECODER" : "ON",
"WITH_AOM_ENCODER" : "ON",
"WITH_DAV1D" : "ON",
"WITH_LIBDE265" : "ON",
"WITH_RAV1E" : "ON",
"WITH_SvtEnc" : "ON",
"WITH_X265" : "ON",
"WITH_JPEG_DECODER" : "ON",
"WITH_JPEG_ENCODER" : "ON",
"WITH_UNCOMPRESSED_CODEC" : "ON",
"WITH_KVAZAAR" : "ON",
"WITH_KVAZAAR_PLUGIN" : "ON",
"WITH_OpenJPEG_DECODER" : "ON",
"WITH_OpenJPEG_DECODER_PLUGIN" : "ON",
"WITH_OpenJPEG_ENCODER" : "ON",
"WITH_OpenJPEG_ENCODER_PLUGIN" : "ON",
"WITH_FFMPEG_DECODER" : "ON",
"WITH_REDUCED_VISIBILITY" : "OFF",
"WITH_DEFLATE_HEADER_COMPRESSION" : "ON",
"WITH_LIBSHARPYUV" : "ON",
"WITH_EXAMPLES": "ON",
"WITH_FUZZERS": "OFF"
}
},
{
"name": "release",
"inherits": "base",
"displayName": "Standard release build",
"description": "Recommended parameters for a release build.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_SHARED_LIBS": "ON",
"BUILD_TESTING" : "OFF",
"WITH_FFMPEG_DECODER_PLUGIN" : "ON",

"WITH_REDUCED_VISIBILITY" : "ON",
"WITH_DEFLATE_HEADER_COMPRESSION" : "ON",
"WITH_LIBSHARPYUV" : "ON",
Expand All @@ -123,30 +98,38 @@
},
{
"name": "release-noplugins",
"inherits": "release",
"displayName": "Release build without plugins",
"description": "Release without plugins with minimal configuration for HEIC and AVIF.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_SHARED_LIBS": "ON",
"BUILD_TESTING" : "OFF",

"ENABLE_PLUGIN_LOADING" : "OFF",
"WITH_LIBDE265" : "ON",
"WITH_X265" : "ON",
"WITH_AOM_DECODER" : "ON",
"WITH_AOM_ENCODER" : "ON",
"WITH_DAV1D" : "OFF",
"WITH_LIBDE265" : "ON",
"WITH_RAV1E" : "OFF",
"WITH_SvtEnc" : "OFF",
"WITH_X265" : "ON",
"WITH_JPEG_DECODER" : "OFF",
"WITH_JPEG_ENCODER" : "OFF",
"WITH_UNCOMPRESSED_CODEC" : "OFF",
"WITH_KVAZAAR" : "OFF",
"WITH_OpenJPEG_DECODER" : "OFF",
"WITH_OpenJPEG_ENCODER" : "OFF",
"WITH_FFMPEG_DECODER" : "OFF"
"WITH_KVAZAAR" : "OFF",
"WITH_OpenJPEG_DECODER" : "OFF",
"WITH_OpenJPEG_ENCODER" : "OFF",
"WITH_FFMPEG_DECODER" : "OFF",

"WITH_REDUCED_VISIBILITY" : "ON",
"WITH_DEFLATE_HEADER_COMPRESSION" : "OFF",
"WITH_LIBSHARPYUV" : "ON",
"WITH_EXAMPLES": "ON",
"WITH_FUZZERS": "OFF"
}
},
{
"name": "testing",
"inherits": "base",
"displayName": "Tests",
"description": "For running the tests",
"cacheVariables": {
Expand All @@ -158,7 +141,7 @@
},
{
"name": "fuzzing",
"inherits": "base",
"inherits": "release",
"displayName": "Fuzzing",
"description": "For running the fuzzers",
"cacheVariables": {
Expand All @@ -168,8 +151,6 @@
"WITH_FUZZERS" : "ON",
"WITH_EXAMPLES" : "OFF",
"ENABLE_PLUGIN_LOADING" : "OFF",
"WITH_DEFLATE_HEADER_COMPRESSION" : "ON",
"WITH_LIBSHARPYUV" : "ON",
"WITH_REDUCED_VISIBILITY" : "OFF"
}
}
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ There are CMake presets to cover the most frequent use cases.
* `release-noplugins`: this is a smaller, self-contained build of libheif without using the plugin system.
A single library is built with support for HEIC and AVIF.
* `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.
* `fuzzing`: all codecs like in release build, but configured into a self-contained library with enabled fuzzers. The library should not distributed.

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 98b987f

Please sign in to comment.