# "::@\<address\>" as suffix of returned item of LINK\_LIBRARIES

**URL:** <https://discourse.cmake.org/t/address-as-suffix-of-returned-item-of-link-libraries/2699>\
**Category:** Code\
**Created:** [February 4, 2021, 7:27pm UTC](https://discourse.cmake.org/t/address-as-suffix-of-returned-item-of-link-libraries/2699 "2021-02-04T19:27:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaun-Cox](https://discourse.cmake.org/user_avatar/discourse.cmake.org/shaun-cox/32/912_2.png) [@Shaun-Cox](https://discourse.cmake.org/u/Shaun-Cox)\
**Post date:** [February 4, 2021, 7:27pm UTC](https://discourse.cmake.org/t/address-as-suffix-of-returned-item-of-link-libraries/2699/1 "2021-02-04T19:27:41Z")

</div>

I’m calling `get_target_property` for `LINK_LIBRARIES` on targets that I want to enumerate dependencies of.

I noticed that sometimes I’m returned strings like this:  
`MyTargetA::@<0000016D82804B50>`  
and other times (the norm) I’m returned strings like this:  
`MyTargetB`

Ultimately, I want to test each of these returned items against `if(TARGET ${item})` and act on those that are targets of my own creation (rather than say, external libraries). But unless I strip off the `::@<0000016D82804B50>` suffix, `MyTargetA` (as example from above) will go unnoticed as a target. Just curious what these variations represent.

Thanks!  
–Shaun

---

<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:** [February 4, 2021, 8:23pm UTC](https://discourse.cmake.org/t/address-as-suffix-of-returned-item-of-link-libraries/2699/2 "2021-02-04T20:23:20Z")

</div>

This is related to modifying or updating targets from outside the directory they are declared in. It is mentioned in [the docs for `LINK_LIBRARIES`](https://cmake.org/cmake/help/latest/prop_tgt/LINK_LIBRARIES.html). You’ll need to strip them off, though your `if (TARGET)` might fail for scoped imported targets (which I guess is fine for your use case).

---

<div class="post-metadata">

**Author:** ![Shaun-Cox](https://discourse.cmake.org/user_avatar/discourse.cmake.org/shaun-cox/32/912_2.png) [@Shaun-Cox](https://discourse.cmake.org/u/Shaun-Cox)\
**Post date:** [February 4, 2021, 8:32pm UTC](https://discourse.cmake.org/t/address-as-suffix-of-returned-item-of-link-libraries/2699/3 "2021-02-04T20:32:19Z")

</div>

Thanks! I even searched CMake docs for “::@”, but no hits.  
Yeah, I’m stripping off the suffix and everything else works fine… just missed finding this in the docs.

---

<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:** [February 5, 2021, 3:01pm UTC](https://discourse.cmake.org/t/address-as-suffix-of-returned-item-of-link-libraries/2699/4 "2021-02-05T15:01:24Z")

</div>

Yeah, unfortunately, searching for (just) symbols isn’t likely to work well. I think the search index is just based on “words” rather than a full text database, but that’s more of a Sphinx thing than CMake anyways.
