diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-08-23 05:28:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-08-23 05:28:29 +0000 |
commit | 33870d908fc5055c6d03108ea573ed0e633eab44 (patch) | |
tree | 38410f8a24bfeb3df77b44aaea9a2de4fe024194 /clang | |
parent | 22f8ecf0cb723f2dd8168b937a68f64a27827a82 (diff) | |
download | bcm5719-llvm-33870d908fc5055c6d03108ea573ed0e633eab44.tar.gz bcm5719-llvm-33870d908fc5055c6d03108ea573ed0e633eab44.zip |
CMake: Improve installation of Clang
- Install clang-cc into libexec
- Install headers into lib/clang/<version>/include
- Don't install other clang-based tools (clang-wpa, clang-index, etc.)
llvm-svn: 79827
Diffstat (limited to 'clang')
-rw-r--r-- | clang/CMakeLists.txt | 5 | ||||
-rw-r--r-- | clang/lib/Headers/CMakeLists.txt | 7 | ||||
-rw-r--r-- | clang/tools/clang-cc/CMakeLists.txt | 3 | ||||
-rw-r--r-- | clang/tools/driver/CMakeLists.txt | 2 |
4 files changed, 11 insertions, 6 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index bb128d68f2b..eb4bd0c9a49 100644 --- a/clang/CMakeLists.txt +++ b/clang/CMakeLists.txt @@ -1,3 +1,6 @@ +# Clang version information +set(CLANG_VERSION 1.0) + macro(add_clang_library name) set(srcs ${ARGN}) if(MSVC_IDE OR XCODE) @@ -36,8 +39,6 @@ macro(add_clang_executable name) set(srcs ${srcs} ${headers}) endif(MSVC_IDE) add_llvm_executable( ${name} ${srcs} ) - install(TARGETS ${name} - RUNTIME DESTINATION bin) endmacro(add_clang_executable) include_directories( diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt index 57d7ee5cdd8..6c874f4b7bb 100644 --- a/clang/lib/Headers/CMakeLists.txt +++ b/clang/lib/Headers/CMakeLists.txt @@ -14,11 +14,10 @@ set(files tmmintrin.h xmmintrin.h) -#FIXME: Centralize Clang version info if (MSVC_IDE OR XCODE) - set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/1.0/include) + set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include) else () - set(output_dir ${LLVM_BINARY_DIR}/lib/clang/1.0/include) + set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include) endif () @@ -36,4 +35,4 @@ add_custom_target(clang-headers ALL install(FILES ${files} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ - DESTINATION Headers) + DESTINATION lib/clang/${CLANG_VERSION}/include) diff --git a/clang/tools/clang-cc/CMakeLists.txt b/clang/tools/clang-cc/CMakeLists.txt index e224d40f6c8..85e4c7c2065 100644 --- a/clang/tools/clang-cc/CMakeLists.txt +++ b/clang/tools/clang-cc/CMakeLists.txt @@ -25,3 +25,6 @@ add_clang_executable(clang-cc clang-cc.cpp ) add_dependencies(clang-cc clang-headers) + +install(TARGETS clang-cc + RUNTIME DESTINATION libexec) diff --git a/clang/tools/driver/CMakeLists.txt b/clang/tools/driver/CMakeLists.txt index f170aa2fa38..1ad04c8dfde 100644 --- a/clang/tools/driver/CMakeLists.txt +++ b/clang/tools/driver/CMakeLists.txt @@ -13,3 +13,5 @@ add_clang_executable(clang add_dependencies(clang clang-cc) +install(TARGETS clang + RUNTIME DESTINATION bin) |