# it may be damaged or incomplete

**URL:** <https://discourse.cmake.org/t/it-may-be-damaged-or-incomplete/3702>\
**Category:** Code\
**Tags:** os:macos\
**Created:** [July 6, 2021, 3:25pm UTC](https://discourse.cmake.org/t/it-may-be-damaged-or-incomplete/3702 "2021-07-06T15:25:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alice/32/1615_2.png) [@alice](https://discourse.cmake.org/u/alice)\
**Post date:** [July 6, 2021, 3:25pm UTC](https://discourse.cmake.org/t/it-may-be-damaged-or-incomplete/3702/1 "2021-07-06T15:25:43Z")

</div>

How can I avoid the error？  
STEP：  
git clone [GitHub - dev-cafe/cmake-cookbook: CMake Cookbook recipes.](https://github.com/dev-cafe/cmake-cookbook/)  
cd cmake-cookbook/chapter-11/recipe-01/cxx-example  
mkdir build  
cd build  
cmake …  
cpack

result：  
click and install it

but finally it show the error

 ![image](https://discourse.cmake.org/uploads/default/original/2X/6/6742b085f4d5dbf5dac0154d95de679edc64ab1e.png)

---

<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 6, 2021, 4:44pm UTC](https://discourse.cmake.org/t/it-may-be-damaged-or-incomplete/3702/2 "2021-07-06T16:44:36Z")

</div>

It doesn’t appear as though the example you’re referring to is set up to use CPack properly. I would recommend asking the author(s) of that project to clarify documentation.

---

<div class="post-metadata">

**Author:** ![alice](https://discourse.cmake.org/user_avatar/discourse.cmake.org/alice/32/1615_2.png) [@alice](https://discourse.cmake.org/u/alice)\
**Post date:** [July 7, 2021, 4:06am UTC](https://discourse.cmake.org/t/it-may-be-damaged-or-incomplete/3702/3 "2021-07-07T04:06:26Z")

</div>

Thanks for your advance.  
Do you have the simple sample with cpack (macOS .dmg)?  
My subject is create a .dmg and install it with interface.

---

<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 7, 2021, 11:26am UTC](https://discourse.cmake.org/t/it-may-be-damaged-or-incomplete/3702/4 "2021-07-07T11:26:13Z")

</div>

I don’t have a simple one off hand, sorry. I do know you should use `add_executable(MACOSX_BUNDLE)`, use `include(CPack)`, and set a bunch of `CPACK_` settings at least. Those might help you find other examples on GitHub or such. Others here may have better information as well.
