Comment 10 for bug 1387011

In , E-dln-l (e-dln-l) wrote :

@Paweł Bylica

Okay I tried building LLVM3.6 with and without ``--enable-shared`` and using the installed LLVM from CMake is working fine for me.

Do you have the LLVM static libraries installed? The exported CMake targets only work with these.

If you take a look at ``/usr/share/llvm/cmake/LLVMExports.cmake``

you'll see stuff like

# LLVM CMake target exports. Do not include directly.
add_library(LLVMOption STATIC IMPORTED)
set_property(TARGET LLVMOption PROPERTY IMPORTED_LOCATION "/home/dsl11/dev/llvm3.6/shared_install/lib/libLLVMOption.a")
add_library(LLVMLineEditor STATIC IMPORTED)
set_property(TARGET LLVMLineEditor PROPERTY IMPORTED_LOCATION "/home/dsl11/dev/llvm3.6/shared_install/lib/libLLVMLineEditor.a")
set_property(TARGET LLVMIRReader PROPERTY IMPORTED_LOCATION "/home/dsl11/dev/llvm3.6/shared_install/lib/libLLVMIRReader.a")

Do the libraries referenced in your version of LLVMExports.cmake exist on your system? If not you need to install them.