From 5a7f34958ca6f2fa8a52e9921cf521cbb92ae070 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Fri, 10 Sep 2010 21:13:16 +0000 Subject: CMake: Update to use standard CMake dependency tracking facilities instead of whatever we were using before... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ba2a622d4..fdc7755de8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR ) endif() # Compute the Clang version from the LLVM version. -string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION}) message(STATUS "Clang version: ${CLANG_VERSION}") @@ -63,7 +63,7 @@ macro(add_clang_library name) set(srcs ${srcs} ${headers}) string( REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR}) list( GET split_path -1 dir) - file( GLOB_RECURSE headers + file( GLOB_RECURSE headers ../../include/clang${dir}/*.h ../../include/clang${dir}/*.td ../../include/clang${dir}/*.def) @@ -92,6 +92,9 @@ macro(add_clang_library name) if( llvm_system_libs ) target_link_libraries(${name} ${llvm_system_libs}) endif( llvm_system_libs ) + if (LLVM_COMMON_LIBS) + target_link_libraries(${name} ${LLVM_COMMON_LIBS}) + endif() add_dependencies(${name} ClangDiagnosticCommon) if(MSVC) get_target_property(cflag ${name} COMPILE_FLAGS) @@ -102,6 +105,7 @@ macro(add_clang_library name) set_target_properties(${name} PROPERTIES COMPILE_FLAGS ${cflag}) endif(MSVC) install(TARGETS ${name} + EXPORT LLVM LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) endmacro(add_clang_library) -- cgit v1.2.1