blob: e63291b2af90ef9c83825a0c08545a4c2f00bf08 [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 Gregorebfc1802009-06-16 20:13:51 +000017if (MSVC_IDE OR XCODE)
Douglas Gregor7f7b7482009-08-23 05:28:29 +000018 set(output_dir ${LLVM_BINARY_DIR}/bin/lib/clang/${CLANG_VERSION}/include)
Douglas Gregorebfc1802009-06-16 20:13:51 +000019else ()
Douglas Gregor7f7b7482009-08-23 05:28:29 +000020 set(output_dir ${LLVM_BINARY_DIR}/lib/clang/${CLANG_VERSION}/include)
Douglas Gregorebfc1802009-06-16 20:13:51 +000021endif ()
22
Oscar Fuentesd2f4e5e2008-10-26 00:56:18 +000023
24foreach( f ${files} )
25 set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
26 set( dst ${output_dir}/${f} )
27 add_custom_command(OUTPUT ${dst}
28 DEPENDS ${src}
29 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
30 COMMENT "Copying clang's ${f}...")
31endforeach( f )
32
Douglas Gregor91a425c2009-06-25 05:07:31 +000033add_custom_target(clang-headers ALL
Oscar Fuentesd2f4e5e2008-10-26 00:56:18 +000034 DEPENDS ${files})
35
36install(FILES ${files}
37 PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
Oscar Fuentes25950e82009-10-27 21:15:21 +000038 DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)