# Tutorial Step4 documentation error

**URL:** https://discourse.cmake.org/t/tutorial-step4-documentation-error/15826
**Category:** Code
**Created:** [September 10, 2026, 7:38pm UTC](https://discourse.cmake.org/t/tutorial-step4-documentation-error/15826 "2026-09-10T19:38:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lostbits](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/l/58956e/32.png) [@lostbits](https://discourse.cmake.org/u/lostbits)
#### Post date: [September 10, 2026, 7:38pm UTC](https://discourse.cmake.org/t/tutorial-step4-documentation-error/15826/1 "2026-09-10T19:38:07Z")

</div>

Am I correct in saying that:

```auto
     Note
     VendorLib is an INTERFACE library, meaning it has no build requirements (because it has already been built). All of its properties should also be interface properties.

```

and

```
 target_link_directories(MyApp PRIVATE Vendor/lib)
 target_include_directories(MyApp PRIVATE Vendor/include)

```

are contradictory? The TODO examples show INTERFACE and not PRIVATE and PRIVATE does not work in cmake --build build

I’m new at this so I’m only asking.

---

<div class="post-metadata">

### Author: ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)
#### Post date: [September 11, 2026, 8:44am UTC](https://discourse.cmake.org/t/tutorial-step4-documentation-error/15826/2 "2026-09-11T08:44:52Z")

</div>

It doesn’t look contradictory. The starting (the one which uses `target_*()` commands on `MyApp`) is one where the consuming project interacts with the files on disk directly: it doesn’t treat the pre-built `libVendor.a` as a logical unit (library with usage requirements), but “decomposes” it into the individual parts (binary, include dirs, link dirs, …). It thus sets all those components individually directly on `MyApp`.

The goal state is one where we tell CMake about the existence of `libVendor.a` and its usage requirements: we register it as a target CMake knows about and can handle as a first-class item. We then need to set up this target accordingly, which means we’ll be modifying the properties of (the new CMake target) `VendorLib`, not of `MyApp`.

---

<div class="post-metadata">

### Author: ![lostbits](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/l/58956e/32.png) [@lostbits](https://discourse.cmake.org/u/lostbits)
#### Post date: [September 12, 2026, 4:41pm UTC](https://discourse.cmake.org/t/tutorial-step4-documentation-error/15826/3 "2026-09-12T16:41:03Z")

</div>

I am confused. Are you saying that the target\_\* commands can be PRIVATE and INTERFACE?

My question arose because the example in the tutorial shows target\_\* PRIVATE, which doesn’t work, and the actual function must use INTERFACE, so why have an example which doesn’t agree with the tutorial? Shouldn’t the example agree with the tutorial?

---

<div class="post-metadata">

### Author: ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)
#### Post date: [September 14, 2026, 7:16am UTC](https://discourse.cmake.org/t/tutorial-step4-documentation-error/15826/4 "2026-09-14T07:16:39Z")

</div>

When configuring `MyApp`, which is an executable, it makes no sense to use any scope other than `PRIVATE`: you want the settings to apply when building `MyApp` itself, and that’s what `PRIVATE` means.

When setting up properties for the new target `VendorLib` which is an _interface library,_ you instead want those settings to apply to whoever consumes (links against) `VendorLib`, not to the build of `VendorLib` itself (since it’s an interface library, it doesn’t even _have_ a build step/process). The scope which means “apply to those who consume me” is `INTERFACE`.

So, the starting point does all the setup by calling `target_*(MyApp PRIVATE ...)`. After the introduction of the `VendorLib` interface library target, you will want to set up most of the properties on that instead of on `MyApp`, using `target_*(VendorLib INTERFACE ...)`.

The scopes and related concepts are described in more detail in the [CMake buildsystem documentation](https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#target-commands).
