CMake Error when importing ClangConfig.cmake
I have a CMakeLists.txt with the following content:
cmake_minimum_
project(myproject)
find_package(LLVM 5.0 REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
find_package(
Clang REQUIRED CONFIG
HINTS "/usr/share/
)
message(STATUS "Using ClangConfig.cmake in: ${Clang_DIR}")
When I run cmake, I get the following output:
-- Found LLVM 5.0.0
-- Using LLVMConfig.cmake in: /usr/lib/
CMake Error at /usr/share/
include could not find load file:
/usr/
Call Stack (most recent call first):
CMakeLists.txt:11 (find_package)
-- Using ClangConfig.cmake in: /usr/share/
-- Configuring incomplete, errors occurred!
Unfortunately, in ClangConfig.cmake the path to ClangTargets.cmake is hard-coded. Is there a way to make this work, or is this a bug?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Moritz Sichert for more information if necessary.