When doing a find_package(Clang CONFIG REQUIRED) in a project using vcpkg's toolchain file, I noticed that Clang's CMake setup is a bit messed up. The specific error is:
CMake Error at /build/vcpkg/installed/x64-osx/share/clang/ClangConfig.cmake:18 (include):
include could not find load file:
/build/vcpkg/installed/lib/cmake/clang/ClangTargets.cmake
Call Stack (most recent call first):
/build/vcpkg/scripts/buildsystems/vcpkg.cmake:247 (_find_package)
CMakeLists.txt:78 (find_package)
In ClangConfig.cmake on we have:
set(CLANG_CMAKE_DIR "${CLANG_INSTALL_PREFIX}/lib/cmake/clang")
...
include("${CLANG_CMAKE_DIR}/ClangTargets.cmake")
This leads me to believe that CLANG_INSTALL_PREFIX is incorrect. Specifically, the installation prefix lacks the os/target x64-osx, and perhaps other things. This seems to be the same problem as what is listed here: https://answers.launchpad.net/ubuntu/+source/llvm-toolchain-5.0/+question/663810
When doing a
find_package(Clang CONFIG REQUIRED)in a project using vcpkg's toolchain file, I noticed that Clang's CMake setup is a bit messed up. The specific error is:In
ClangConfig.cmakeon we have:This leads me to believe that
CLANG_INSTALL_PREFIXis incorrect. Specifically, the installation prefix lacks the os/targetx64-osx, and perhaps other things. This seems to be the same problem as what is listed here: https://answers.launchpad.net/ubuntu/+source/llvm-toolchain-5.0/+question/663810