# CMake Error: install(EXPORT "ProjectTargets" ...) includes target "xxx" which requires target "yyy" that is not in any export set.

**URL:** https://discourse.cmake.org/t/cmake-error-install-export-projecttargets-includes-target-xxx-which-requires-target-yyy-that-is-not-in-any-export-set/7344
**Category:** Code
**Created:** [January 28, 2023, 5:54pm UTC](https://discourse.cmake.org/t/cmake-error-install-export-projecttargets-includes-target-xxx-which-requires-target-yyy-that-is-not-in-any-export-set/7344 "2023-01-28T17:54:49Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [January 29, 2023, 8:21pm UTC](https://discourse.cmake.org/t/cmake-error-install-export-projecttargets-includes-target-xxx-which-requires-target-yyy-that-is-not-in-any-export-set/7344/6 "2023-01-29T20:21:29Z")

</div>

> [@ClausKlein](#):
>
> Do you mean starting with v3.26?

Err, yes, sorry.

To use it:

```cmake
target_link_libraries(${PROJECT_NAME}
  PRIVATE
    "$<BUILD_INTERFACE:${PROJECT_NAME}_myoptions>"
    "$<BUILD_INTERFACE:${PROJECT_NAME}_mywarnings>")

```

Replace `BUILD_INTERFACE` with `BUILD_LOCAL_INTERFACE` once you can assume CMake 3.26.

---

_[View the full topic](https://discourse.cmake.org/t/cmake-error-install-export-projecttargets-includes-target-xxx-which-requires-target-yyy-that-is-not-in-any-export-set/7344)._
