# Cmake - pack\_rebuild

**URL:** <https://swi-prolog.discourse.group/t/cmake-pack-rebuild/406>\
**Category:** General\
**Created:** [March 16, 2019, 8:12pm UTC](https://swi-prolog.discourse.group/t/cmake-pack-rebuild/406 "2019-03-16T20:12:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swi](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@swi](https://swi-prolog.discourse.group/u/swi)\
**Post date:** [March 16, 2019, 8:12pm UTC](https://swi-prolog.discourse.group/t/cmake-pack-rebuild/406/1 "2019-03-16T20:12:39Z")

</div>

Does `pack_rebuild/1` allow the use of `cmake` for add-ons?

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [March 17, 2019, 1:17pm UTC](https://swi-prolog.discourse.group/t/cmake-pack-rebuild/406/2 "2019-03-17T13:17:00Z")

</div>

Not directly at the moment. AFAIK, it looks for

- `configure.ac` or `configure.in`  
In this case it runs autoheader and autoconf to create `configure`
- `configure`  
In this case it runs this
- `Makefile`  
In this case it runs `make`

So, you can add a simple `configure` script that calls `cmake` and all should work fine. Ideally there should be a `FindSWI-Prolog.cmake` that would define a CMake target that lets you link against SWI-Prolog. If you have experience writing such a thing, please contribute.
