# PkgConfig's IMPORTED\_TARGET doesn't seem to have a \`\_STATIC\` variant?

**URL:** <https://discourse.cmake.org/t/pkgconfigs-imported-target-doesnt-seem-to-have-a-static-variant/3186>\
**Category:** Code\
**Created:** [April 21, 2021, 5:01pm UTC](https://discourse.cmake.org/t/pkgconfigs-imported-target-doesnt-seem-to-have-a-static-variant/3186 "2021-04-21T17:01:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![morrisonlevi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/morrisonlevi/32/1354_2.png) [@morrisonlevi](https://discourse.cmake.org/u/morrisonlevi)\
**Post date:** [April 21, 2021, 5:01pm UTC](https://discourse.cmake.org/t/pkgconfigs-imported-target-doesnt-seem-to-have-a-static-variant/3186/1 "2021-04-21T17:01:46Z")

</div>

Consider something like this:

```cmake
find_package(PkgConfig REQUIRED)
pkg_check_modules(UV REQUIRED IMPORTED_TARGET libuv)

```

There doesn’t seem to be a `PkgConfig::UV_STATIC` target that has all the properties from running `pkg-config --static`. There are `UV_STATIC_*` variables, but no target. I could use these to make a target, I suppose, but I don’t yet have enough confidence to make sure it’s right.

I tried tracing through the macros [FindPkgConfig.cmake](https://github.com/Kitware/CMake/blob/02fbe4083c95b46dd5b066639f40ce33f75f2d46/Modules/FindPkgConfig.cmake), but I don’t understand macros enough yet to make sense of _why_ it’s not made.

Is this an intentional omission?

---

<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:** [April 21, 2021, 6:06pm UTC](https://discourse.cmake.org/t/pkgconfigs-imported-target-doesnt-seem-to-have-a-static-variant/3186/2 "2021-04-21T18:06:52Z")

</div>

It’s probably an oversight. The initial implementation probably didn’t consider static libraries. Please file [a feature request](https://gitlab.kitware.com/cmake/cmake/-/issues) for this.

---

<div class="post-metadata">

**Author:** ![morrisonlevi](https://discourse.cmake.org/user_avatar/discourse.cmake.org/morrisonlevi/32/1354_2.png) [@morrisonlevi](https://discourse.cmake.org/u/morrisonlevi)\
**Post date:** [April 22, 2021, 4:04pm UTC](https://discourse.cmake.org/t/pkgconfigs-imported-target-doesnt-seem-to-have-a-static-variant/3186/3 "2021-04-22T16:04:59Z")

</div>

Turns out one was filed 3 months ago! [https://gitlab.kitware.com/cmake/cmake/-/issues/21714](https://gitlab.kitware.com/cmake/cmake/-/issues/21714)
