reflect-cpp provides CMake targets: find_package(reflectcpp CONFIG REQUIRED) target_link_libraries(main PRIVATE reflectcpp::reflectcpp)