set(LLVM_LINK_COMPONENTS support)

add_clang_library(clangRename
  USRFinder.cpp
  USRFindingAction.cpp
  USRLocFinder.cpp
  RenamingAction.cpp

  LINK_LIBS
  clangAST
  clangBasic
  clangIndex
  clangToolingCore
  )

add_subdirectory(tool)

set(LLVM_LINK_COMPONENTS support)

add_clang_library(clangRename
  USRFinder.cpp
  USRFindingAction.cpp
  USRLocFinder.cpp
  RenamingAction.cpp

  LINK_LIBS
  clangAST
  clangBasic
  clangIndex
  clangLex
  clangToolingCore
  )

add_subdirectory(tool)

Fix broken dependency on shared build.
[clang-rename] Fix broken dependency on shared build.

Summary:
The build is broken due to a missing dependency.

To repro: [Release + Shared]
```
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
```

Which produce this error:
```
tools/clang/tools/extra/clang-rename/CMakeFiles/clangRename.dir/USRLocFinder.cpp.o: In function `clang::RecursiveASTVisitor<clang::rename::(anonymous namespace)::USRLocFindingASTVisitor>::TraverseCXXConstructorDecl(clang::CXXConstructorDecl*)':
USRLocFinder.cpp:(.text._ZN5clang19RecursiveASTVisitorINS_6rename12_GLOBAL__N_123USRLocFindingASTVisitorEE26TraverseCXXConstructorDeclEPNS_18CXXConstructorDeclE+0x170): undefined reference to `clang::Lexer::getSourceText(clang::CharSourceRange, clang::SourceManager const&, clang::LangOptions const&, bool*)'
```

Reviewers: alexfh, yaron.keren

Subscribers: yaron.keren, cfe-commits

Differential Revision: http://reviews.llvm.org/D20240

git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@269429 91177308-0d34-0410-b5e6-96231b3b80d8
