# CPACK\_INSTALLED\_DIRECTORIES, How to use?

**URL:** https://discourse.cmake.org/t/cpack-installed-directories-how-to-use/11496
**Category:** Usage
**Tags:** os:linux
**Created:** [August 21, 2024, 9:35am UTC](https://discourse.cmake.org/t/cpack-installed-directories-how-to-use/11496 "2024-08-21T09:35:48Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Li\_Haohuang](https://discourse.cmake.org/user_avatar/discourse.cmake.org/li_haohuang/32/4771_2.png) [@Li\_Haohuang](https://discourse.cmake.org/u/Li_Haohuang)
#### Post date: [August 21, 2024, 9:35am UTC](https://discourse.cmake.org/t/cpack-installed-directories-how-to-use/11496/1 "2024-08-21T09:35:48Z")

</div>

![image](https://discourse.cmake.org/uploads/default/original/2X/7/7a499acb5ba8411f75731ca3a8a8bd4d2ee0dd25.png)  
Too less description!  
**I don’t know how to specify value to this variable to meet my needs**

[Packaging With CPack — Mastering CMake](https://cmake.org/cmake/help/book/mastering-cmake/chapter/Packaging%20With%20CPack.html#cpack-and-other-installed-directories)

Can I get a demo please!! Thank you very much 😭!  
How should I specify the pairs of directory and subdirectory, whether both directory can be specified with absolute path or I should specify the subdirectory in relative path, which will be relative to variable CPACK\_PACKAGING\_INSTALL\_PREFIX? How to separate each pair?

Another question:  
How can I generate both each-component distribution package and all-component distribution package by using DEB or TGZ generator, I have achieved generating deb package for each of my component by setting _CPACK\_DEB\_COMPONENT\_INSTALL_ to _ON_.  
how to use **CPACK\_PROJECT\_CONFIG\_FILE** for each of my package generator to specify variables for each generator exclusively?  
Where can I get more examples about cpack?

Best wishes! I do really need your help, Thank you!

---

<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: [July 25, 2025, 4:08pm UTC](https://discourse.cmake.org/t/cpack-installed-directories-how-to-use/11496/2 "2025-07-25T16:08:41Z")

</div>

I don’t see test cases for it. I think that would be part of fleshing out the docs for this. Could you please [file an issue](https://gitlab.kitware.com/cmake/cmake/-/issues)?
