krpc provides CMake integration:
find_package(krpc CONFIG REQUIRED)
target_link_libraries(main PRIVATE krpc::krpc)