Closed noctera closed 3 years ago
Hi!
I don't think that FetchContent requires some support on the side of an external project. Its purpose is to get any external project and add its content to your build tree. So I think you have to study the usage of FetchContent more deeply. It seems there are various options for FetchContent that allows you to deal with RESTinio's directory structure/ For example, the RESTinio's root doesn't have CMakeLists.txt, the top-level CMakeLists.txt is in dev
subdirectory. So the FetchContent_Declare
may look like:
FetchContent_Declare(restinio
GIT_REPOSITORY https://github.com/Stiffstream/restinio
SOURCE_SUBDIR dev
)
You may also have set appropriate values for variables like restinio_TEST
, restinio_SAMPLE
, restinio_INSTALL_SAMPLES
, and so on.
Please also note that RESTinio doesn't contain some important dependencies (like http-parser and fmtlib) inside the git-repo, so you have to fetch those dependencies by yourself.
PS. We don't use CMake for the development of RESTinio, CMake support is provided only for the convenience of users. We aren't experts in CMake.
I'm using restinio lib with Conan now. Works perfekt and there are no problems with installation and linking.
I'm wondering if I could use the restinio lib with cmakes' fetchContent functionality.
I have tried it with
But it didn't work. I think there isn't any fetchContent support, is it?