-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMakeLists.txt example #3
Comments
Hi! For vcpkg, try also to include cmake_minimum_required(VERSION 3.8.0)
project (helloworld)
add_executable(helloworld helloworld.cpp)
# RESTinio dependencies:
# 1. ASIO or Boost::ASIO (goes as headers, vcpkg knows where)
# 2. HTTP parser
find_package(unofficial-http-parser REQUIRED)
# 3. fmtlib
find_package(fmt REQUIRED)
# RESTinio itself
find_package(restinio REQUIRED)
# Make your project dependent on restinio,
# and let cmake deal with all the headers paths and linked libs.
target_link_libraries(helloworld PRIVATE restinio::restinio) |
Hi, Your example works... and thanks for the quick response. You should add this example in the documentation in the CMake section. Jean-Marc |
It a usual question. I periodically go through the similar issues with 3rd party libs myself. It's clear for the authors how to put all dependencies together but for a fresher, it might be tricky. So feel free to ask for any help with RESTinio.
Yeah, sounds reasonable. Will keep the issue opened until adding notes to docs. |
A working sample added to https://stiffstream.com/en/docs/restinio/0.4/obtaining.html#vcpkg |
@ngrodzitski You might look at adding a |
Hello,
We want to test restinio under Windows 10. Apparently, we can use the vcpkg tool. We have installed all the necessary libraries but we can't build our example. Do you have an example CMakeLists.txt file that works?
Here is the error message :
And the contents of the CMakeLists.txt file :
The text was updated successfully, but these errors were encountered: