Facebook's wangle library can be set up with cmake like below:
set_and_check(WANGLE_INCLUDE_DIR /usr/local/include/wangle)
set_and_check(WANGLE_CMAKE_DIR /usr/local/lib/cmake/wangle)
if (NOT TARGET wangle::wangle)
include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake")
endif()
set(WANGLE_LIBRARIES wangle::wangle)
if (NOT wangle_FIND_QUIETLY)
message(STATUS "Found wangle: ${PACKAGE_PREFIX_DIR}")
endif()
However, proxygen's install.sh doesn't put the include and lib files in /usr/local like wangle and other fb libraries do.
What is the proper way to set the include and link with proxygen via cmake?
According to the proxygen
READMEyou should install all requirements, includingfolly,wangle,fmt,fizz, andmvfstif you need HTTP/3 protocol. After installing proxygen with the instruction in theREADMEyou can use it in your CMake project. Following is an exampleCMakeLists.txtand you can find the complete sample project in this repo.