# How to add custom plugin to the cpack package

**URL:** <https://discourse.slicer.org/t/how-to-add-custom-plugin-to-the-cpack-package/25322>\
**Category:** Development\
**Created:** [September 19, 2022, 3:45am UTC](https://discourse.slicer.org/t/how-to-add-custom-plugin-to-the-cpack-package/25322 "2022-09-19T03:45:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay1987](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jay1987/32/16183_2.png) [@jay1987](https://discourse.slicer.org/u/jay1987)\
**Post date:** [September 19, 2022, 3:45am UTC](https://discourse.slicer.org/t/how-to-add-custom-plugin-to-the-cpack-package/25322/1 "2022-09-19T03:45:09Z")

</div>

i have wrote one custom plugin , and i want the PACKAGE project can package the plugin  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/a/4a37c29ad22681b082f364cdf6ef9cb90e0d406b.png)  
i try to write the cmake in cmake\_install.cmake like this

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/a/8ab4ab2343c98e24442206625dbab283d8ddf023.png)  
it does true to package the custom plugin into the slicer project tree and running without error,but it can’t package into a exe file with the error below  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/a/ba2402a1bea6fc60e446f60e28ececbd59836c3f.png)  
i guess i wrote a wrong way , it should not wirte into the cmake\_install.cmake file,but i don’t known which file should do the work.
