# Source package vs binary installer; CPackArchive vs other generators

**URL:** https://discourse.cmake.org/t/source-package-vs-binary-installer-cpackarchive-vs-other-generators/622
**Category:** Usage
**Created:** [February 12, 2020, 4:15pm UTC](https://discourse.cmake.org/t/source-package-vs-binary-installer-cpackarchive-vs-other-generators/622 "2020-02-12T16:15:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jwuttke](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/9dc877/32.png) [@jwuttke](https://discourse.cmake.org/u/jwuttke)
#### Post date: [February 12, 2020, 4:15pm UTC](https://discourse.cmake.org/t/source-package-vs-binary-installer-cpackarchive-vs-other-generators/622/1 "2020-02-12T16:15:46Z")

</div>

While actively working through the docs, things are slowly getting clearer to me … and new questions arise:

- Is CPackArchive the only generator for source packages?
- All other CPack generators generate installers?

CPackArchive is normally run from `CPackSourceConfig.cmake` or from target `package_source`. When I run it from `CPackConfig.cmake` or from `package` it generates an empty archive.

- Is this my fault? How to install files so that they make it into the archive?
- Or does it make no sense to run CPackArchive from `CPackConfig.cmake`, and should be forbidden?

---

<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: [February 13, 2020, 12:25am UTC](https://discourse.cmake.org/t/source-package-vs-binary-installer-cpackarchive-vs-other-generators/622/2 "2020-02-13T00:25:29Z")

</div>

> [@jwuttke](#):
>
> Is CPackArchive the only generator for source packages?

You can also create [source RPMs](https://cmake.org/cmake/help/latest/cpack_gen/rpm.html#packaging-of-sources-srpm).

> [@jwuttke](#):
>
> All other CPack generators generate installers?

The [External generator](https://cmake.org/cmake/help/latest/cpack_gen/external.html) doesn’t.

Regarding the archive generator type, it can be used to create either binary or source packages. I’m not sure what you mean by “run CPackArchive”, but if you choose an archive generator like `TGZ` or `ZIP`, it should create binary archives.
