# What should be included in CMakeLists.txt to start a VMTK C++ project?

**URL:** <https://discourse.slicer.org/t/what-should-be-included-in-cmakelists-txt-to-start-a-vmtk-c-project/18734>\
**Category:** VMTK\
**Created:** [July 14, 2021, 4:09pm UTC](https://discourse.slicer.org/t/what-should-be-included-in-cmakelists-txt-to-start-a-vmtk-c-project/18734 "2021-07-14T16:09:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankiole](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@frankiole](https://discourse.slicer.org/u/frankiole)\
**Post date:** [July 14, 2021, 4:09pm UTC](https://discourse.slicer.org/t/what-should-be-included-in-cmakelists-txt-to-start-a-vmtk-c-project/18734/1 "2021-07-14T16:09:33Z")

</div>

Hi,

I am trying to implement VMTK functions in my C++ code. I am able to run my program using both ITK and VTK libraries, however I cannot access VMTK libraries. I’ve already built VMTK, and I’m tweaking my CMakeLists.txt file in the project folder. When recompiling, it either ignores VMTK or produces [this problem](https://groups.google.com/g/vmtk-users/c/g1kGrt5Znwk). Any help on how to write my CMakeLists.txt file to compile correctly would be greatly appreciated. Thank you!

-Frank

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 10, 2021, 9:01pm UTC](https://discourse.slicer.org/t/what-should-be-included-in-cmakelists-txt-to-start-a-vmtk-c-project/18734/2 "2021-08-10T21:01:14Z")

</div>

You would normally use ExternalProject infrastructure of CMake to build dependencies, such as VMTK. You can find an example here: [GitHub - vmtk/SlicerExtension-VMTK](https://github.com/vmtk/SlicerExtension-VMTK)
