[LLVMdev] Adding a library to CMake deps

Arnaud A. de Grandmaison arnaud.adegm at gmail.com
Tue Sep 3 05:41:10 PDT 2013


On 09/03/2013 02:13 PM, Renato Golin wrote:
> Hi folks,
>
> When cross-compiling LLVM to ARM, using CMake+Ninja, I realized that
> libxml2 depends on lzma, but the dependency is not explicit on the
> build.ninja file under the "build bin/c-index-test"'s LINK_LIBRARIES
> (which is the only one that cares about it).
>
> I couldn't find the place to add -llzma into the deps, and the only
> mention of libxml2 is in config-ix.cmake:
>
> find_package(LibXml2)
> if (LIBXML2_FOUND)
>   set(CLANG_HAVE_LIBXML 1)
> endif ()
>
> Which I could do the same with lzma? Any ideas on what the problem is,
> and possibly how to fix it?

libxml2 comes with a 'xml2-config' shell script to get the right
compilation / linking flags for the platform libxml2 was built on.

Is '|xml2-config --libs' giving |the required depencies ?

Cheers,
--
Arnaud A. de Grandmaison

>
> thanks,
> --renato
>
> PS: The work around is to edit the build.ninja file manually after
> CMake runs, but that's sub-optimal.
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-- 
Arnaud A. de Grandmaison

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130903/27b8f841/attachment.html>


More information about the llvm-dev mailing list