-
Notifications
You must be signed in to change notification settings - Fork 1.7k
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
how to use find_package(cpprestsdk REQUIRED) in CMakeLists.txt #686
Comments
It may be an issue with the naming of the C++ REST SDK CMake project vs module. Have you tried the following?
|
try with this: |
I am also having the same find package error when using the version in apt |
I didn't tried with the package coming from apt... I built |
I had the same problem, but as mentioned by @garethsb-sony, the suggestion did the trick for me. However, i acquired packages through vcpkg and passing |
I'm running into the same issue on an Ubuntu Docker image - I'm trying to set up a reproducable 32 bit build environment for Linux and this library just isn't playing well with Linux at all! Are there also any plans to update this wiki page because it doesn't work on a blank Ubuntu image. I tried using Here's my Dockerfile and cmake command that's executed inside the container. |
What's the issue? I'm using cpprestsdk both on Linux machines and containers compiling for x86, x64 and arm architectures without any issue. |
@elvisdukaj it just won't get past the
I don't really know what else to do other than I should add that one of the requirements for my project is that it builds to 32 bit, so I have |
@Southclaws The version coming with apt-get don't install cmake files! You need to compile it by yourself... |
It might an issue with your CMakeLists file, @Southclaws. You have to define your cmake project first with |
@elvisdukaj ah okay, I didn't know that, I'll try building from source again (I failed already, but that's probably a question for stackoverflow rather than here) @sarunassarakojis already got a |
Try |
Hi, Currently we are trying to install cpprest/casablanca on RHEL 6.9 but we are not successful. We also dont have root access. Could you please provide us the steps to install it with root access and also without root access ? |
I have the same issue. I installed
I get a similar error:
If I search for
I'm playing around with the CMAKE variables (e.g. |
You might have a look on my fork (https://github.com/EdgarWahn/cpprestsdk). I added some of the files needed to be able to import the project with find_package. Feel free to drop me a note, my target is to have the changes backported to the main project (I just touched makefiles, not code). |
I now understand the problem. When installing from the Ubuntu packages, the
Unfortunately, this doesn't match any of the paths that cmake will naturally search. This page describes the search order and you can see that the files are almost in the right place. Any of the following paths would have been acceptable:
I've worked around this by specifying
|
On Ubuntu 16.04 LTS, there are no CMake config packages installed with the libcpprest-dev (2.8.0-2). You can see the files installed in the file list: https://packages.ubuntu.com/xenial/amd64/libcpprest-dev/filelist On Ubuntu 18.04, libcpprest-dev (2.10.2-6) is installed with CMake config files. You can see those CMake files installed in file list: https://packages.ubuntu.com/bionic/amd64/libcpprest-dev/filelist
PS: I just tried to build from source and it works for git tag v2.10.9 on Ubuntu 16.04 lts. |
Just come across with the same issue on Ubuntu 18.04 and cpprestsdk 2.10. As dmjones #686 (comment) mentioned, solved by wrapping the
This is an alternative way to resolve the issue. Personally think that they really should put these |
Workaround for Ubuntu |
Hey there. This one works for me (Ubuntu 18.04):
|
Seems like Ubuntu maintainers has fixed this. However it's not currently available in the stable branch |
Building yourself fixes this 22 apt-get install g++ git libboost-atomic-dev libboost-thread-dev libboost-system-dev libboost-date-time-dev libboost-regex-dev libboost-filesystem-dev libboost-random-dev libboost-chrono-dev libboost-serialization-dev libwebsocketpp-dev openssl libssl-dev ninja-build
23 git clone https://github.com/Microsoft/cpprestsdk.git casablanca
24 cd casablanca
25 mkdir build.debug
26 cd build.debug
27 cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug
28 ninja
29 ninja install |
ubuntu 16.4 LTS
install cpprestsdk use: sudo apt-get install libcpprest-dev
write "find_package(cpprestsdk REQUIRED)" to the CMakeLists.txt,there some build error:
"By not providing "Findcpprestsdk.cmake" in CMAKE_MODULE_PATH this project"
how to write the "Findcpprestsdk.cmake" file,is any example already exists on ubuntu?
The text was updated successfully, but these errors were encountered: