Simplify CreateStyleHeader CMake utility

This commit is contained in:
Richard Berger 2018-06-28 14:22:37 -04:00
parent 206d349d5b
commit e0dc53ab3f
1 changed files with 3 additions and 7 deletions

View File

@ -45,14 +45,10 @@ function(FindStyleHeadersExt path style_class extension headers sources)
endfunction(FindStyleHeadersExt)
function(CreateStyleHeader path filename)
math(EXPR N "${ARGC}-2")
set(temp "")
if(N GREATER 0)
math(EXPR ARG_END "${ARGC}-1")
foreach(IDX RANGE 2 ${ARG_END})
list(GET ARGV ${IDX} FNAME)
if(ARGC GREATER 2)
list(REMOVE_AT ARGV 0 1)
foreach(FNAME ${ARGV})
get_filename_component(FNAME ${FNAME} NAME)
set(temp "${temp}#include \"${FNAME}\"\n")
endforeach()