Skip to content

Commit

Permalink
Fixed recursive header matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
farcaller committed Jun 25, 2009
1 parent 32af42f commit 44f66e3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMake/Cocotron.cmake
Expand Up @@ -2,7 +2,7 @@ FUNCTION(FIND_STUFF dir ext plat var)
# find all files with EXT in DIR matching specified PLATform and return
# the list in VAR

FILE(GLOB files "${dir}/*.${ext}" "${dir}/**/*.${ext}")
FILE(GLOB_RECURSE files "${dir}/*.${ext}")
FOREACH(f ${files})
# check each file
GET_FILENAME_COMPONENT(fn ${f} NAME)
Expand Down Expand Up @@ -31,7 +31,7 @@ FUNCTION(FIND_STUFF dir ext plat var)
SET(${var} ${fl} PARENT_SCOPE)
ENDFUNCTION(FIND_STUFF)

FUNCTION(HEADER_TARGET dir tn)
FUNCTION(HEADER_RULE dir ovar)
FIND_STUFF("${CMAKE_SOURCE_DIR}/${dir}" "h" ${COCOTRON_PLATFORM} headers)
FOREACH(src ${headers})
GET_FILENAME_COMPONENT(file_base ${src} NAME)
Expand All @@ -44,9 +44,8 @@ FUNCTION(HEADER_TARGET dir tn)
)
SET(headers_out ${headers_out} ${dst})
ENDFOREACH(src)
ADD_CUSTOM_TARGET(${tn} DEPENDS ${headers_out})
#SET(${ovar} ${headers_out} PARENT_SCOPE)
ENDFUNCTION(HEADER_TARGET)
SET(${ovar} ${headers_out} PARENT_SCOPE)
ENDFUNCTION(HEADER_RULE)

FUNCTION(ASM_RULE src ovar)
FOREACH(f ${src})
Expand Down

0 comments on commit 44f66e3

Please sign in to comment.