[CMake] Question about find_packages.

Kyle Edwards kyle.edwards at kitware.com
Fri Mar 15 12:08:55 EDT 2019


On Fri, 2019-03-15 at 17:03 +0100, Workbench at gmx.at wrote:
> Hi everyone,
> 
> i try to use find_packages for clang, i'm on debian and have
> installed
> libclang-4.0-dev package, now i've the files in
> /usr/lib/llvm4-0/lib/libclang-4.0.so and the include in
> /usr/lib/llvm-4.0/include/clang - how can i make find_package find
> those ??

LLVM contains package config files which give you all of this
information. Use find_package() as normal:

find_package(LLVM)

And then invoke CMake with:

$ cmake . -DLLVM_DIR=/usr/lib/llvm-4.0/cmake

Kyle


More information about the CMake mailing list