CMake: Also include header files in target when the generator is 'XCode'.

llvm-svn: 67703
This commit is contained in:
Ted Kremenek 2009-03-25 20:34:07 +00:00
parent 1e550e15cc
commit a87b8a9a72
1 changed files with 2 additions and 2 deletions

View File

@ -1,13 +1,13 @@
macro(add_clang_library name)
set(srcs ${ARGN})
if(MSVC_IDE)
if(MSVC_IDE OR XCODE)
file( GLOB_RECURSE headers *.h)
set(srcs ${srcs} ${headers})
string( REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR})
list( GET split_path -1 dir)
file( GLOB_RECURSE headers ../../include/clang${dir}/*.h)
set(srcs ${srcs} ${headers})
endif(MSVC_IDE)
endif(MSVC_IDE OR XCODE)
add_library( ${name} ${srcs} )
if( LLVM_COMMON_DEPENDS )
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )