# Building as an external project dependency (C++)

**URL:** https://discourse.kitware.com/t/building-as-an-external-project-dependency-c/1675
**Category:** Pulse Physiology Engine
**Created:** [July 9, 2026, 6:37am UTC](https://discourse.kitware.com/t/building-as-an-external-project-dependency-c/1675 "2026-07-09T06:37:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![quadrupoletensor](https://discourse.kitware.com/user_avatar/discourse.kitware.com/quadrupoletensor/32/1190_2.png) [@quadrupoletensor](https://discourse.kitware.com/u/quadrupoletensor)
#### Post date: [July 9, 2026, 6:37am UTC](https://discourse.kitware.com/t/building-as-an-external-project-dependency-c/1675/1 "2026-07-09T06:37:02Z")

</div>

I’m trying to use Pulse as a dependency for a larger preexisting project, in MSVC/Visual Studio 2022.

I am pulling in the Pulse engine via fetchcontent, and the files are cloned into my build directory as expected. The library’s build system is a little unconventional though, and I’m having trouble getting it plugged in correctly. My CMake chops are mediocre at best.

Pulse seems to require an install path to be specified, but also builds some static libs into an `InnerBuild` folder in my build directory. Despite seeing the libs in both folders, `target_link_libraries(project PRIVATE Pulse::Pulse)` isn’t able to find the files (`LINK : fatal error LNK1104: cannot open file 'Pulse::Pulse.lib'`), nor does it add the include directories. `find_package` doesn’t find anything either. I usually don’t “install” cmake libraries and just let it automatically handle the build artifacts internally, so I’m not sure if something different needs to be done here.

The how-to CMakeLists.txt example seems pretty seamless, but that’s within the engine source tree which probably simplifies the dependency resolution. Is there an example of how to build Pulse as an external dependency to a parent project somewhere?

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [July 10, 2026, 4:09pm UTC](https://discourse.kitware.com/t/building-as-an-external-project-dependency-c/1675/2 "2026-07-10T16:09:53Z")

</div>

I have not experimented with `FetchContents`.  
I still use the superbuild approach, via `AddExternalProject`.  
[This talks](https://gitlab.kitware.com/physiology/engine/-/wikis/how%20to%20connect%20to%20pulse#cmake-integration) about using that approach, but is pretty dated, so might need to clean it up.

The Pulse CMake system uses this, so you could also grab our utilities from our cmake folder to setup your project as a superbuild. So maybe the combination of that wiki page and looking at the Pulse code base will help you. (You would need to write a External\_Pulse.cmake file, like what is [here](https://gitlab.kitware.com/physiology/engine/-/tree/stable/cmake/external?ref_type=heads))

In general though, when you build Pulse, there is a Pulse.cmake located in the install/lib/cmake/pulse directory, pointing your `CMAKE_MODULE_PATH` then `find_package` should find Pulse.

---

<div class="post-metadata">

### Author: ![quadrupoletensor](https://discourse.kitware.com/user_avatar/discourse.kitware.com/quadrupoletensor/32/1190_2.png) [@quadrupoletensor](https://discourse.kitware.com/u/quadrupoletensor)
#### Post date: [July 10, 2026, 5:46pm UTC](https://discourse.kitware.com/t/building-as-an-external-project-dependency-c/1675/3 "2026-07-10T17:46:38Z")

</div>

Thanks, I will give this a try. There are so many ways to design a project’s integration mechanism with CMake that figuring it out on a new codebase can be a puzzle…
