# Lone dollar sign passed to target\_link\_libraries

**URL:** https://discourse.cmake.org/t/lone-dollar-sign-passed-to-target-link-libraries/12692
**Category:** Usage
**Created:** [October 6, 2024, 10:19am UTC](https://discourse.cmake.org/t/lone-dollar-sign-passed-to-target-link-libraries/12692 "2024-10-06T10:19:30Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![howprice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/howprice/32/4988_2.png) [@howprice](https://discourse.cmake.org/u/howprice)
#### Post date: [October 6, 2024, 10:19am UTC](https://discourse.cmake.org/t/lone-dollar-sign-passed-to-target-link-libraries/12692/1 "2024-10-06T10:19:30Z")

</div>

[vcpkgx.com](http://vcpkgx.com) provides CMake snippets for using packages in a project. They all seem to include a lone dollar sign $ in the code. For example, for the [SDL2 package](https://vcpkgx.com/details.html?package=sdl2):

```auto
sdl2 provides CMake targets:

    find_package(SDL2 CONFIG REQUIRED)
    target_link_libraries(main
        PRIVATE
        $
        $,SDL2::SDL2,SDL2::SDL2-static>
    )

```

I can’t figure out what those $ mean, and have had no joy searching for its meaning. Is this valid syntax, and if so, what does it do?

---

<div class="post-metadata">

### Author: ![marc.chevrier](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/m/ecb155/32.png) [@marc.chevrier](https://discourse.cmake.org/u/marc.chevrier)
#### Post date: [October 6, 2024, 11:09am UTC](https://discourse.cmake.org/t/lone-dollar-sign-passed-to-target-link-libraries/12692/2 "2024-10-06T11:09:11Z")

</div>

This is not a valid syntax. I suspect some corruption on CMake generator expressions done by HTML formatting…

---

<div class="post-metadata">

### Author: ![howprice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/howprice/32/4988_2.png) [@howprice](https://discourse.cmake.org/u/howprice)
#### Post date: [October 6, 2024, 8:04pm UTC](https://discourse.cmake.org/t/lone-dollar-sign-passed-to-target-link-libraries/12692/3 "2024-10-06T20:04:38Z")

</div>

Thanks very much. I’ll report this to the site administrator.

EDIT: Reported: [CMake snippets are incorrect for SDL2 packages · Issue #17 · vcpkgx/vcpkgx.github.io · GitHub](https://github.com/vcpkgx/vcpkgx.github.io/issues/17)

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [October 6, 2024, 9:12pm UTC](https://discourse.cmake.org/t/lone-dollar-sign-passed-to-target-link-libraries/12692/4 "2024-10-06T21:12:54Z")

</div>

That looks to me like their site is treating the `<...>` part of generator expressions as HTML tags and is stripping them out.
