build: fix cmake warning with newer CMake

Hoist the compatibility macros out a level and re-use them when adding link
dependencies.  Silences a warning from CMake.

llvm-svn: 213469
diff --git a/lldb/source/CMakeLists.txt b/lldb/source/CMakeLists.txt
index 8239fe6..8eb413d 100644
--- a/lldb/source/CMakeLists.txt
+++ b/lldb/source/CMakeLists.txt
@@ -300,7 +300,7 @@
     ${LLDB_VERS_GENERATED_FILE}
     )
 endif()
-target_link_libraries(liblldb ${LLDB_SYSTEM_LIBS})
+target_link_libraries(liblldb ${cmake_2_8_12_PRIVATE} ${LLDB_SYSTEM_LIBS})
 
 # Determine LLDB revision and repository. GetSourceVersion and GetRepositoryPath are shell-scripts, and as
 # such will not work on Windows.