Skip to content

Commit 61e79bb

Browse files
tejlmandcarlescufi
authored andcommitted
doc: updated to reflect changes introduced with Zephyr CMake package
This commit updates the Zephyr documentation with changes introduced by Zephyr CMake package. It removes 'zephyr-env.sh/cmd' where no longer needed, and updates boilerplate inclusion to find_package. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent b32b5e1 commit 61e79bb

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

doc/README.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,15 @@ folder, here are the commands to generate the html content locally:
132132
.. code-block:: console
133133
134134
# On Linux/macOS
135-
cd ~/zephyr
136-
source zephyr-env.sh
137-
mkdir -p doc/_build && cd doc/_build
135+
cd ~/zephyr/doc
138136
# On Windows
139-
cd %userprofile%\zephyr
140-
zephyr-env.cmd
141-
mkdir doc\_build & cd doc/_build
137+
cd %userprofile%\zephyr\doc
142138
143139
# Use cmake to configure a Ninja-based build system:
144-
cmake -GNinja ..
140+
cmake -GNinja -B_build .
141+
142+
# Enter the build directory
143+
cd _build
145144
146145
# To generate HTML output, run ninja on the generated build system:
147146
ninja htmldocs
@@ -181,7 +180,6 @@ there:
181180
.. code-block:: console
182181
183182
cd ~/zephyr
184-
source zephyr-env.sh
185183
186184
# To generate HTML output
187185
make htmldocs
@@ -227,7 +225,6 @@ To enable this mode, set the following option when invoking cmake::
227225
or invoke make with the following target::
228226

229227
cd ~/zephyr
230-
source zephyr-env.sh
231228

232229
# To generate HTML output without detailed Kconfig
233230
make htmldocs-fast

doc/guides/modules.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ section.
131131
.. code-block:: cmake
132132
133133
set(ZEPHYR_MODULES <path-to-module1> <path-to-module2> [...])
134-
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
134+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
135135
136-
If you choose this option, make sure to set the variable **before** including
137-
the boilerplate file, as shown above.
136+
If you choose this option, make sure to set the variable **before** calling
137+
``find_package(Zephyr ...)``, as shown above.
138138

139139
#. In a separate CMake script which is pre-loaded to populate the CMake cache,
140140
like this:

0 commit comments

Comments
 (0)