@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") add_library(LLVMIRReader STATIC IMPORTED) 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.
@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/LLVMExpor ts.cmake` `
you'll see stuff like
``` LLVMOption STATIC IMPORTED) dsl11/dev/ llvm3.6/ shared_ install/ lib/libLLVMOpti on.a") LLVMLineEditor STATIC IMPORTED) dsl11/dev/ llvm3.6/ shared_ install/ lib/libLLVMLine Editor. a") LLVMIRReader STATIC IMPORTED) dsl11/dev/ llvm3.6/ shared_ install/ lib/libLLVMIRRe ader.a" )
# LLVM CMake target exports. Do not include directly.
add_library(
set_property(TARGET LLVMOption PROPERTY IMPORTED_LOCATION "/home/
add_library(
set_property(TARGET LLVMLineEditor PROPERTY IMPORTED_LOCATION "/home/
add_library(
set_property(TARGET LLVMIRReader PROPERTY IMPORTED_LOCATION "/home/
...
```
Do the libraries referenced in your version of LLVMExports.cmake exist on your system? If not you need to install them.