blob: 441630294005b3c81d850e80b20a32647447c776 [file] [log] [blame]
Oscar Fuentes07d9f9a2008-10-26 00:56:18 +00001set(files
Chris Lattnerdad40622010-04-14 03:54:58 +00002 altivec.h
Douglas Gregore1839932009-06-07 07:09:23 +00003 emmintrin.h
4 float.h
5 iso646.h
6 limits.h
7 mm_malloc.h
8 mmintrin.h
9 pmmintrin.h
10 stdarg.h
11 stdbool.h
12 stddef.h
13 stdint.h
14 tgmath.h
15 tmmintrin.h
16 xmmintrin.h)
Oscar Fuentes07d9f9a2008-10-26 00:56:18 +000017
Douglas Gregor274a6b42009-06-16 20:13:51 +000018if (MSVC_IDE OR XCODE)
Douglas Gregor33870d92009-08-23 05:28:29 +000019 set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include)
Douglas Gregor274a6b42009-06-16 20:13:51 +000020else ()
Douglas Gregor33870d92009-08-23 05:28:29 +000021 set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include)
Douglas Gregor274a6b42009-06-16 20:13:51 +000022endif ()
23
Oscar Fuentes07d9f9a2008-10-26 00:56:18 +000024
25foreach( f ${files} )
26 set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
27 set( dst ${output_dir}/${f} )
28 add_custom_command(OUTPUT ${dst}
29 DEPENDS ${src}
30 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
31 COMMENT "Copying clang's ${f}...")
32endforeach( f )
33
Douglas Gregor9b5f9cd2009-06-25 05:07:31 +000034add_custom_target(clang-headers ALL
Oscar Fuentes07d9f9a2008-10-26 00:56:18 +000035 DEPENDS ${files})
36
37install(FILES ${files}
38 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
Oscar Fuentes843c8282009-10-27 21:15:21 +000039 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)