Comments (5)
Hi!
For vcpkg, try also to include find_package(unofficial-http-parser REQUIRED)
to a list of packages you search.
I guess this would work (if no, let me know, I'll make a sample from scratch).
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)
from restinio.
Hi,
Your example works... and thanks for the quick response.
We learn CMake at the same time. Sorry if the question seem silly.
You should add this example in the documentation in the CMake section.
Jean-Marc
from restinio.
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.
You should add this example in the documentation in the CMake section.
Yeah, sounds reasonable. Will keep the issue opened until adding notes to docs.
from restinio.
A working sample added to https://stiffstream.com/en/docs/restinio/0.4/obtaining.html#vcpkg
from restinio.
@ngrodzitski You might look at adding a find_dependency()
call to your -config.cmake
file: https://cmake.org/cmake/help/latest/module/CMakeFindDependencyMacro.html
from restinio.
Related Issues (20)
- Compilation of express router tests fails on VC++ 19 (VisualStudio 2022) HOT 1
- HTTPS not working
- <algorithm> isn't included in easy_parser.hpp
- Any chance std::fopen() call can be changed to std::fopen_s()? HOT 14
- New overload for sendfile and std::filesystem::path?
- CMake configure fails when using boost asio via find HOT 9
- vcpkg should have a variant with RESTinio+Boost.Asio HOT 1
- There should be operator<< for http_status_code_t
- static_if_impl has to be replaced with if constexpr
- There is no such type as generic_request_handler_t
- build system regression: RESTINIO_USE_EXTERNAL_SOBJECTIZER no longer available HOT 3
- allow using catch2 from system HOT 8
- Slow compilation HOT 2
- HTTP/2 and HTTP/3 HOT 1
- Is ninja supported? HOT 2
- Do not use SO_REUSEADDR on Window by default
- Question: How to get http_server_t<> address HOT 2
- display webpage of directory listing HOT 1
- Many tests fail: failed to start server on 127.0.0.1:8086: bind: Address already in use HOT 1
- Fails to find system Catch2: include could not find requested file: Catch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restinio.