diff options
| author | Chris Bieneman <beanz@apple.com> | 2016-01-14 22:48:45 +0000 |
|---|---|---|
| committer | Chris Bieneman <beanz@apple.com> | 2016-01-14 22:48:45 +0000 |
| commit | 9c92d67b78904ede7f0f71d31ff2aed3080f17b2 (patch) | |
| tree | 6e25c8980eaa077ddfad1943f1c51f0045c85dae /clang/tools | |
| parent | 61266fc955188d376a22a725e1d800c7107e2135 (diff) | |
| download | bcm5719-llvm-9c92d67b78904ede7f0f71d31ff2aed3080f17b2.tar.gz bcm5719-llvm-9c92d67b78904ede7f0f71d31ff2aed3080f17b2.zip | |
[CMake] Move the install logic for libclang's headers into the libclang CMakelists
This makes it so if you disable building libclang you won't install the headers as part of the 'install' target.
llvm-svn: 257828
Diffstat (limited to 'clang/tools')
| -rw-r--r-- | clang/tools/libclang/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt index 5267c02db5f..d7eaca1094b 100644 --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -115,3 +115,25 @@ if(ENABLE_SHARED) DEFINE_SYMBOL _CINDEX_LIB_) endif() endif() + +if(INTERNAL_INSTALL_PREFIX) + set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include") +else() + set(LIBCLANG_HEADERS_INSTALL_DESTINATION include) +endif() + +install(DIRECTORY ../../include/clang-c + COMPONENT libclang-headers + DESTINATION "${LIBCLANG_HEADERS_INSTALL_DESTINATION}" + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + ) + +if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDE's. + add_custom_target(install-libclang-headers + DEPENDS + COMMAND "${CMAKE_COMMAND}" + -DCMAKE_INSTALL_COMPONENT=libclang-headers + -P "${CMAKE_BINARY_DIR}/cmake_install.cmake") +endif() |

