# CMake + CPack "Unspecified" component

**URL:** <https://discourse.cmake.org/t/cmake-cpack-unspecified-component/8143>\
**Category:** Code\
**Created:** [May 17, 2023, 11:51am UTC](https://discourse.cmake.org/t/cmake-cpack-unspecified-component/8143 "2023-05-17T11:51:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![antoniovazquezblanco](https://discourse.cmake.org/user_avatar/discourse.cmake.org/antoniovazquezblanco/32/3448_2.png) [@antoniovazquezblanco](https://discourse.cmake.org/u/antoniovazquezblanco)\
**Post date:** [May 17, 2023, 11:51am UTC](https://discourse.cmake.org/t/cmake-cpack-unspecified-component/8143/1 "2023-05-17T11:51:33Z")

</div>

Hi everyone!

I am trying to contribute to a friends project with a nice packing and distribution system. The code I wrote can be found in my fork:

> **[GitHub - antoniovazquezblanco/sigutils at dev/dist](https://github.com/antoniovazquezblanco/sigutils/tree/dev/dist)**
>
> dev/dist

Particularly, I want to split DEB packaging into two versions, a lib deb and a devel deb.  
When trying to do this I run into CPack not detecting one of my components. Here you have a verbose CPack output indicating that there is an Unspecified component:

```auto
...
CPack Verbose: Installing: /home/runner/work/sigutils/sigutils/build/dist/_CPack_Packages/Linux/DEB/sigutils-0.3.0-Linux/DEVELOPMENT/usr/lib/x86_64-linux-gnu/pkgconfig/sigutils.pc
CPack: - Install component: Unspecified
CPack Verbose: Install configuration: "Release"
CPack Verbose: Installing: /home/runner/work/sigutils/sigutils/build/dist/_CPack_Packages/Linux/DEB/sigutils-0.3.0-Linux/Unspecified/usr/lib/x86_64-linux-gnu/libsigutils.so.0.3.0
CPack Verbose: Installing: /home/runner/work/sigutils/sigutils/build/dist/_CPack_Packages/Linux/DEB/sigutils-0.3.0-Linux/Unspecified/usr/lib/x86_64-linux-gnu/libsigutils.so.1
CPack Verbose: Installing: /home/runner/work/sigutils/sigutils/build/dist/_CPack_Packages/Linux/DEB/sigutils-0.3.0-Linux/Unspecified/usr/lib/x86_64-linux-gnu/libsigutils.so
CPack: Create package
...

```

The code responsible for defining that intstall target is the following:

```auto
...
# Define the library target	
add_library(sigutils SHARED ${SRCS})
...
# Target properties
set_property(TARGET sigutils PROPERTY VERSION ${SIGUTILS_VERSION})
set_property(TARGET sigutils PROPERTY SOVERSION ${SIGUTILS_ABI_VERSION})
...
# File install
install(TARGETS sigutils LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RUNTIME)
...

```

Full code can be found at:

> <https://github.com/antoniovazquezblanco/sigutils/blob/dev/dist/src/CMakeLists.txt>

I have read about install target only applying component property to the selected component, but in this case, it seems not to apply it…

What am I doing wrong?

Thanks in advance!

---

<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:** [May 17, 2023, 4:45pm UTC](https://discourse.cmake.org/t/cmake-cpack-unspecified-component/8143/2 "2023-05-17T16:45:45Z")

</div>

`RUNTIME` may get detected as an argument to `install(TARGETS)`. Does it work if you use lowercase?

---

<div class="post-metadata">

**Author:** ![antoniovazquezblanco](https://discourse.cmake.org/user_avatar/discourse.cmake.org/antoniovazquezblanco/32/3448_2.png) [@antoniovazquezblanco](https://discourse.cmake.org/u/antoniovazquezblanco)\
**Post date:** [May 17, 2023, 6:34pm UTC](https://discourse.cmake.org/t/cmake-cpack-unspecified-component/8143/3 "2023-05-17T18:34:00Z")

</div>

Thanks @ben.boeckel! Easy solution for an easy problem! I could not see it 🤦‍♂️
