# How to force NSIS installer to pack files from a debug configuration?

**URL:** https://discourse.cmake.org/t/how-to-force-nsis-installer-to-pack-files-from-a-debug-configuration/6975
**Category:** Usage
**Tags:** os:linux, cpack:nsis
**Created:** [November 28, 2022, 5:28pm UTC](https://discourse.cmake.org/t/how-to-force-nsis-installer-to-pack-files-from-a-debug-configuration/6975 "2022-11-28T17:28:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JuhaniX](https://discourse.cmake.org/user_avatar/discourse.cmake.org/juhanix/32/2964_2.png) [@JuhaniX](https://discourse.cmake.org/u/JuhaniX)
#### Post date: [November 28, 2022, 5:28pm UTC](https://discourse.cmake.org/t/how-to-force-nsis-installer-to-pack-files-from-a-debug-configuration/6975/1 "2022-11-28T17:28:47Z")

</div>

I need to make an installer with NSIS that installs debug versions of files.

It seems that CPack or NSIS does not care about `cmake -D Release` or `cmake -D Debug`. It is packing always release files to an installer.

This is propably some simple cpack option, I hope anyways

Thanks

---

<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: [November 30, 2022, 7:54pm UTC](https://discourse.cmake.org/t/how-to-force-nsis-installer-to-pack-files-from-a-debug-configuration/6975/2 "2022-11-30T19:54:36Z")

</div>

Do the files end up clobbering each other in the package? That is, do the release and debug libraries both have names like `libfoo.so.1` and the release configuration just gets copied afterwards and therefore “wins”?

Other than that, what generator are you using for the build itself?

---

<div class="post-metadata">

### Author: ![JuhaniX](https://discourse.cmake.org/user_avatar/discourse.cmake.org/juhanix/32/2964_2.png) [@JuhaniX](https://discourse.cmake.org/u/JuhaniX)
#### Post date: [December 4, 2022, 3:36pm UTC](https://discourse.cmake.org/t/how-to-force-nsis-installer-to-pack-files-from-a-debug-configuration/6975/3 "2022-12-04T15:36:17Z")

</div>

I am using a Ninja generator.

Under the `build_win64/._CPack_Packages/win64/NSIS64/` there seems to be a naming convention where DLLNAMEHERE.dll (the release file) has a sister file libDLLNAMEHERE.dll (the debug file).  
So I was building to same directory as release, I think I should build under different directory build\_win64.debug and try that way.

I skipped the NSIS installer and manually copied the debug binary files to a another machine, I believe I now have a proper installation to work with.
