Lines Matching refs:CMake
3 Zephyr CMake Package
6 The Zephyr `CMake package`_ is a convenient way to create a Zephyr-based application.
12 The Zephyr CMake package ensures that CMake can automatically select a Zephyr installation to use f…
20 To use the Zephyr CMake package it must first be exported to the `CMake user package registry`_.
22 CMake user package registry.
29 In Linux, the CMake user package registry is found in:
35 In macOS, the CMake user package registry is found in:
41 In Windows, the CMake user package registry is found in:
43 ``HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr``
46 The Zephyr CMake package allows CMake to automatically find a Zephyr base.
52 Zephyr CMake package export (west)
60 Zephyr CMake package export (without west)
63 Zephyr CMake package is exported to the CMake user package registry using the following commands:
69 This will export the current Zephyr to the CMake user package registry.
71 To also export the Zephyr Unittest CMake package, run the following command in addition:
82 The Zephyr CMake package search functionality allows for explicitly specifying
91 This syntax instructs CMake to first search for Zephyr using the Zephyr base environment setting
96 Zephyr CMake Package Search Order
132 * Zephyr freestanding application will use the Zephyr registered in the CMake user package registry.
138 └── zephyr (Not exported to CMake)
141 └── zephyr (Exported to CMake)
149 in this example, only ``<projects>/zephyr-workspace-2/zephyr`` is exported to the CMake package
156 running CMake.
160 The Zephyr package selected on the first CMake invocation will be used for all subsequent
165 Zephyr CMake Package Version
174 It also helps CMake to select the correct Zephyr to use for building, when there are multiple
185 CMake will search all exported candidates to find a Zephyr installation which matches this version
188 Thus it is possible to have multiple Zephyr installations and have CMake automatically select
189 between them based on the version number provided, see `CMake package version`_ for details.
196 └── zephyr (Exported to CMake)
199 └── zephyr (Exported to CMake)
221 CMake also supports the keyword ``EXACT``, to ensure an exact version is used, if that is required.
318 Zephyr Build Configuration CMake packages
328 but they set CMake variables instead. They also allow you to automatically share the build
330 cases, such as loading of additional CMake boilerplate code.
332 The Zephyr Build Configuration CMake packages will be loaded in the Zephyr boilerplate code after
333 initial properties and ``ZEPHYR_BASE`` has been defined, but before CMake code execution. The
336 This allows the Zephyr Build Configuration CMake packages to setup or extend properties such as:
342 in the appropriate location. The CMake ``find_package`` mechanism will search for these files with
343 the steps below. Other default CMake package search paths and hints are disabled and there is no
345 installed in the CMake package registry. The search steps are:
357 can be set on the CMake command line, **before** ``find_package(Zephyr ...)``, as environment
358 variable or from a CMake cache initialization file with the ``-C`` command line option.
363 `CMake package search procedure`_ is valid and will work.
365 If you want to completely disable the search for these packages, you can use the special CMake
408 Zephyr CMake package source code
411 The Zephyr CMake package source code in
413 :zephyr_file:`share/zephyrunittest-package/cmake` contains the CMake config
414 package which is used by the CMake ``find_package`` function.
416 It also contains code for exporting Zephyr as a CMake config package.
421 The Zephyr package version file. This file is called by CMake to determine
431 The Zephyr package file. This file is called by CMake to for the package