# Advice on Combining CHAI3D and OpenSim with CMake

**URL:** https://discourse.cmake.org/t/advice-on-combining-chai3d-and-opensim-with-cmake/14325
**Category:** Usage
**Created:** [July 7, 2025, 1:20pm UTC](https://discourse.cmake.org/t/advice-on-combining-chai3d-and-opensim-with-cmake/14325 "2025-07-07T13:20:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AHMADREZA\_RAVANGARD](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ahmadreza_ravangard/32/5653_2.png) [@AHMADREZA\_RAVANGARD](https://discourse.cmake.org/u/AHMADREZA_RAVANGARD)
#### Post date: [July 7, 2025, 1:20pm UTC](https://discourse.cmake.org/t/advice-on-combining-chai3d-and-opensim-with-cmake/14325/1 "2025-07-07T13:20:18Z")

</div>

Hi,

I’m working on a C++ project where I need to use both **CHAI3D** (for haptics) and **OpenSim** (for simulation). Each library has its own CMake setup, and I’m trying to combine them into a single CMake project on **Windows 11** using the **Visual Studio generator**.

Could you please suggest the best approach to set this up?

---

<div class="post-metadata">

### Author: ![vito.gamberini](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vito.gamberini/32/4376_2.png) [@vito.gamberini](https://discourse.cmake.org/u/vito.gamberini)
#### Post date: [July 7, 2025, 1:45pm UTC](https://discourse.cmake.org/t/advice-on-combining-chai3d-and-opensim-with-cmake/14325/2 "2025-07-07T13:45:08Z")

</div>

OpenSim is a normal CMake project, you can build and install it as with any CMake project and then discover it with `find_package()`.

CHAI3D is very far from a modern package. It produces a CMakeConfig but does not install it, instead the whole package uses runtime output directories and `export()` to make itself available. You will need to build CHAI3D and point `chai3d_ROOT` at the resulting build directory to discover it with `find_package()`.

Once discovered with `find_package()` you will be able to link to their exported targets with `target_link_libraries()`.
