Advice on Combining CHAI3D and OpenSim with CMake

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().