libhv icon indicating copy to clipboard operation
libhv copied to clipboard

MbedTLS Paths

Open ffreality opened this issue 1 year ago • 1 comments

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.

ffreality avatar May 22 '24 11:05 ffreality

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.

ithewei avatar May 22 '24 11:05 ithewei

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 ?

ffreality avatar May 29 '24 10:05 ffreality

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.

ithewei avatar May 29 '24 12:05 ithewei

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 ?

ffreality avatar May 29 '24 14:05 ffreality

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

ithewei avatar May 29 '24 14:05 ithewei

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

you are perfect !

ffreality avatar May 29 '24 17:05 ffreality