curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Problem building libcurl agaist mbedtls WITHOUT installing the mbedtls build on the build host.

From: Morten Winkler Jørgensen via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 06 Aug 2022 20:46:20 +0200

> > I have tried to specify libraries and folders as
>
>
> > ```
> > set(MBEDTLS_INCLUDE_DIRS "something I thought make sense" CACHE STRING "blah foo" FORCE)
> > set(MBEDTLS_LIBRARY "something I thought make sense" CACHE STRING "blah foo" FORCE)
> > set(MBEDX509_LIBRARY "something I thought make sense" CACHE STRING "blah foo" FORCE)
> > set(MBEDCRYPTO_LIBRARY "something I thought make sense" CACHE STRING "blah foo" FORCE)
> > ```
> >
> > in the CMakeFile.txt that includes curl as a sub_directory but in vain.
>
> This is tricky because curl does not check for possible target but always looks for installed copy (something we should improve).
>
I see. Thanks for clarifying.
>
> What you've done here should at least keep CMake happy but will probably fail during compilation because curl will try to link to mbedtls
>
YEP! :-)
> You'd either need to patch curl CMake to use the embedtls target or maybe settle on a superbuild pattern with ExternalProjexxt_Add.
>
I will patch my local CMakeLists.txt files, then. Thanks for pointing out the road forward.
> BTW: Instead of custom scripts for downloading the external sources, you could use CMake's FetchContent.
> Oh! TIL; Thank you.

Cheers,
Morten




-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-08-06