Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting a custom dir to pull the clang includes from #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions bbl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,24 @@ install(
${CMAKE_INSTALL_LIBDIR}/cmake/babble
)

if(NOT DEFINED LIBCLANG_DIR)
set(LIBCLANG_DIR ${CLANG_INSTALL_PREFIX})
endif()

# copy the clang resource dir to the installation so we can pick up the headers
# first need to extract the major version to get the right path from the
# llvm installation
install(
DIRECTORY
${CLANG_INSTALL_PREFIX}/lib/clang/${LLVM_VERSION_MAJOR}/include
${LIBCLANG_DIR}/lib/clang/${LLVM_VERSION_MAJOR}/include
DESTINATION
${CMAKE_INSTALL_LIBDIR}/resource
)

# also copy it to the binary dir so we can pick it up in the test runner
file(
COPY
${CLANG_INSTALL_PREFIX}/lib/clang/${LLVM_VERSION_MAJOR}/include
COPY
${LIBCLANG_DIR}/lib/clang/${LLVM_VERSION_MAJOR}/include
DESTINATION
${CMAKE_BINARY_DIR}
)
)