Skip to content
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

MbedTLS Paths #554

Closed
ffreality opened this issue May 22, 2024 · 6 comments
Closed

MbedTLS Paths #554

ffreality opened this issue May 22, 2024 · 6 comments

Comments

@ffreality
Copy link

ffreality commented May 22, 2024

How can I enable MBedTLS on CMake ? GUI doesn't ask paths for include and .lib.
So, is there any terminal command or environment variable value ?

package manager usage is not an option for me.

@ithewei
Copy link
Owner

ithewei commented May 22, 2024

cmake -DWITH_MBEDTLS=ON to enable mbedtls.
If your mbedtls is not in the default search path, you may need to modify cmake yourself and add include_directories and link_directories.

@ffreality
Copy link
Author

ffreality commented May 29, 2024

what do you mean as a default search path ? I installed Mbed TLS with with cmake --build . --config Release --target INSTALL and it is under Program Files. Do I need to define an environment variable ? If yes, what is name of variables ?

Other http server libraries asks us to show include dir and libraries.

Same with nghttp2. What is default search path which you mentioned ?

@ithewei
Copy link
Owner

ithewei commented May 29, 2024

libhv's cmake default header file search path is ${libhv_root}/include and ${libhv_root}/3rd/include,
libraries search path is ${libhv_root}/lib and ${libhv_root}/3rd/lib.

@ffreality
Copy link
Author

ffreality commented May 29, 2024

Hi, thank you for your answer.
there is no ${libhv_root}/3rd/include but I copied my everest, mbedtls, psa directories to ${libhv_root}/include.
It passed header related problems but right now it asks me mbedtls.lib with this error.
2>LINK : fatal error LNK1181: cannot open input file 'mbedtls.lib'

I tried these:
I copied mbedtls.lib, mbedx509.lib, mbedcrypto.lib, p256m.lib, everest.lib to

  • root/include
  • root/include/lib
  • root/include/libs
  • root/include/mbedtls
    folders but problem continues.

Should I need to copy them to another folder ?

@ithewei
Copy link
Owner

ithewei commented May 29, 2024

You can copy libraries to root/lib or root/3rd/lib.

@ffreality
Copy link
Author

You can copy libraries to root/lib or root/3rd/lib.

you are perfect !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants