rsocket / rsocket-cpp

C++ implementation of RSocket
http://rsocket.io
Apache License 2.0
253 stars 99 forks source link

find folly using its installed cmake config file #875

Open simpkins opened 5 years ago

simpkins commented 5 years ago

Summary: Find folly using its installed CMake configuration file, and delete the custom FindFolly.cmake file that was being used previously. The FindFolly.cmake file did not list all dependent libraries necessary to link statically against folly. Linking against folly as a shared library is not recommended, as folly provides no binary compatibility guarantees between changes. folly's current CMake-based build only builds it as a static library by default.

This also changes the build process to build folly with CMake rather than its deprecated autotools-based build when RSOCKET_INSTALL_DEPS or INSTALL_FOLLY is set. Note that the build now happens as part of the cmake step, since folly must be installed before we call find_package() to find folly.

Test Plan: Tested building rsocket-cpp on an Ubuntu 18.04 host. Confirmed it worked both with an existing folly installation, as well as when using INSTALL_FOLLY to have rsocket download and build folly as part of its build steps.