The package boost-throw-exception is compatible with built-in CMake targets of FindBoost.cmake: find_package(Boost REQUIRED COMPONENTS throw_exception) target_link_libraries(main PRIVATE Boost::throw_exception) or the generated cmake configs via: find_package(boost_throw_exception REQUIRED CONFIG) target_link_libraries(main PRIVATE Boost::throw_exception)