blob: 57d7ee5cdd8a74433a8769e47d783b12531adf4c [file] [log] [blame]
Oscar Fuentesd2f4e5e2008-10-26 00:56:18 +00001set(files
Douglas Gregor06026002009-06-07 07:09:23 +00002 emmintrin.h
3 float.h
4 iso646.h
5 limits.h
6 mm_malloc.h
7 mmintrin.h
8 pmmintrin.h
9 stdarg.h
10 stdbool.h
11 stddef.h
12 stdint.h
13 tgmath.h
14 tmmintrin.h
15 xmmintrin.h)
Oscar Fuentesd2f4e5e2008-10-26 00:56:18 +000016
Douglas Gregor06026002009-06-07 07:09:23 +000017#FIXME: Centralize Clang version info
Douglas Gregorebfc1802009-06-16 20:13:51 +000018if (MSVC_IDE OR XCODE)
19 set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/1.0/include)
20else ()
21 set(output_dir ${LLVM_BINARY_DIR}/lib/clang/1.0/include)
22endif ()
23
Oscar Fuentesd2f4e5e2008-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 Gregor91a425c2009-06-25 05:07:31 +000034add_custom_target(clang-headers ALL
Oscar Fuentesd2f4e5e2008-10-26 00:56:18 +000035 DEPENDS ${files})
36
37install(FILES ${files}
38 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
39 DESTINATION Headers)