Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -137,20 +137,22 @@ ${CMAKE_CURRENT_BINARY_DIR}/include ) -install(DIRECTORY include/ - DESTINATION include - FILES_MATCHING - PATTERN "*.h" - PATTERN ".svn" EXCLUDE - ) +if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + ) -install(DIRECTORY ${POLLY_BINARY_DIR}/include/ - DESTINATION include - FILES_MATCHING - PATTERN "*.h" - PATTERN "CMakeFiles" EXCLUDE - PATTERN ".svn" EXCLUDE - ) + install(DIRECTORY ${POLLY_BINARY_DIR}/include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.h" + PATTERN "CMakeFiles" EXCLUDE + PATTERN ".svn" EXCLUDE + ) +endif() add_definitions( -D_GNU_SOURCE ) Index: cmake/polly_macros.cmake =================================================================== --- cmake/polly_macros.cmake +++ cmake/polly_macros.cmake @@ -43,10 +43,12 @@ if( LLVM_LINK_COMPONENTS ) llvm_config(${name} ${LLVM_LINK_COMPONENTS}) endif( LLVM_LINK_COMPONENTS ) - install(TARGETS ${name} - EXPORT LLVMExports - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly") + install(TARGETS ${name} + EXPORT LLVMExports + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) + endif() set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) endmacro(add_polly_library)