Hi, thank you so much for the free services you guys provide here which I really appreciate! as a student it helps a lot!
I want to use libcpr c++ library in a C++ application as subdirectory but every time I try to compile it fails due no read permission to openssl headers in "/usr/include"
To reproduce
git clone https://github.com/libcpr/cpr
cd cpr && mkdir build
cd build && cmake .. && make
Result:
CMake Error in /home/username/cpr/build/CMakeFiles/CMakeScratch/TryCompile-pLm3Rk/CMakeLists.txt:
Imported target "OpenSSL::SSL" includes non-existent path
"/usr/include"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error at /usr/local/share/cmake/Modules/CheckLibraryExists.cmake:71 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
build/_deps/curl-src/CMake/Macros.cmake:32 (check_library_exists)
build/_deps/curl-src/CMakeLists.txt:842 (check_library_exists_concat)
Is it possible to provide a read-only access to the "/usr/include" so CMake will find openssl headers?
Is there a better solution to compile libcpr on the server other than building the library in some external FreeBSD machine and upload them to the server..? this will need ongoing maintenance and will be time consuming.
Thank you again and happy new year! :