Skip to content

[llvm] CLANG_INSTALL_PREFIX has wrong value #5153

@pgoodman

Description

@pgoodman

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

Metadata

Metadata

Assignees

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions