Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -177,8 +177,10 @@ set( CLANG_BUILT_STANDALONE 1 ) set(BACKEND_PACKAGE_STRING "LLVM ${LLVM_PACKAGE_VERSION}") + set(EXPORT_GROUP ClangTargets) else() set(BACKEND_PACKAGE_STRING "${PACKAGE_STRING}") + set(EXPORT_GROUP LLVMExports) endif() find_package(LibXml2 2.5.3 QUIET) @@ -401,7 +403,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "libclang") install(TARGETS ${name} COMPONENT ${name} - EXPORT ClangTargets + EXPORT ${EXPORT_GROUP} LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} RUNTIME DESTINATION bin) @@ -582,8 +584,7 @@ set(CLANG_ORDER_FILE "" CACHE FILEPATH "Order file to use when compiling clang in order to improve startup time.") -if (CLANG_BUILT_STANDALONE OR CMAKE_VERSION VERSION_EQUAL 3 OR - CMAKE_VERSION VERSION_GREATER 3) +if (CLANG_BUILT_STANDALONE) # Generate a list of CMake library targets so that other CMake projects can # link against them. LLVM calls its version of this file LLVMExports.cmake, but # the usual CMake convention seems to be ${Project}Targets.cmake.