Everything with a default is optional
(reformat into table?)
condition: Condition to include/parse/setup the projectname(default:get_filename_component(NAME_WE): Name of the projectdescription: Description of the projecthomepage: Homepage/URL of the projectlanguages<array> : Languages used within the projectpackage_name(default:(parrent_package_name_)name: Name used forfind_package()export_name(default:package_name| remove? ) : Name of the target export groupexport_namespace(default:(parent_export_namespace::)package_name) : Export namespace for targetsversion(default:0.1) : Version of the projectversion_compatibility(default:AnyNewerVersion) : According to thisoptions<array of objects>: Options to define for the project. Details heredependencies<array of objects|string>: Required dependencies for the project. Details herelist<array of string>: Required dependencies for the project. Details herecmake_config_install_destination(default:${CMAKE_INSTALL_DATAROOTDIR}/package_name) : Installation directory of the<PackageName>Config.cmakeversioned_installed(experimental): Use an extra directorypackage_name-version_majorfor installed includes.usage_include_directory(experimental|default:${CMAKE_INSTALL_INCLUDEDIR}/(package_name-version)) : usage (INTERFACE) include directory to add to the exported targetspublic_header_install_destination(experimental|default:${CMAKE_INSTALL_INCLUDEDIR}/(package_name-version/)package_name) : Installation directory for public headerscomponent_name(experimental) : Name of the subcomponentpublic_cmake_module_path: Public CMake module path. This directory will be installed alongside the generated targets/configs
Note: Either name, variable or both need to be defined.
name(default: lowercaservariablewithoutWITH_) : Name of option displayed byfeature_summaryvariable(default: Uppercasepackage_name_WITH_name) : Variable used by the optiondescription: Description for the optiontype(default: BOOL) : Valid CMake variable typedefault_value(default: BOOL->OFF | "") : Default value of the option variablecondition: Conditional Option. See here for detailsexport: Export the variable into the generated<PackeName>Config.cmakeand make it visible tofind_package()callersno_feature_info: disable call toadd_feature_info(only for type BOOL)valid_values(only type STRING): Valid values for the option (via STRINGS property)dependencies<array of objects|string>: Optional dependencies for the project. Details here
Either simply a string with the <PackageName> for the find_package(<PackageName>) call or an JSON object with the following fields:
name: Name of the dependencypkg_config_name(unused) : Alternative pkg-config nameversion: Version of the dependencyfind_package(<PackageName> <version>)description(unused) : Description for the dependency.purpose: Purpose of the dependency within the project. Seefeature_summarycomponents: Components to add tofind_package(<PackageName> COMPONENTS <components>)find_options: Additional options to add tofind_package(<PackageName> <find_options>)condition: Condition to perform thefind_package()call (Note: Only use this for platform based conditions. Option based conditions should list their dependencies under the relevant option!)
Please also refer to CMake find_package(<PackageName>)
Strings to either:
- A
*.target.jsonto generate a new target callingcmakejson_target_file - A
*.project.jsonto parse a new project callingcmakejson_project_file - A
*.cmakefile toinclude - A relative path to a subdirectory for
add_subdiretory