libmysofa provides CMake targets: find_package(mysofa CONFIG REQUIRED) target_link_libraries(main PRIVATE $,mysofa::mysofa-shared,mysofa::mysofa-static>)