Skip to content

Commit

Permalink
Add remove_target_sources() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jun 29, 2020
1 parent 03bde95 commit 6b36a64
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions nice_target_sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,17 @@ function(nice_target_sources target_name src_loc)
set_source_files_properties(${not_linux_sources} PROPERTIES SKIP_AUTOGEN TRUE)
endif()
endfunction()

function(remove_target_sources target_name src_loc)
set(list ${ARGV})
list(REMOVE_AT list 0 1)

set(sources "")
foreach (entry ${list})
set(full_name ${src_loc}/${entry})
list(APPEND sources ${full_name})
endforeach()

set_source_files_properties(${sources} PROPERTIES HEADER_FILE_ONLY TRUE)
set_source_files_properties(${sources} PROPERTIES SKIP_AUTOGEN TRUE)
endfunction()

0 comments on commit 6b36a64

Please sign in to comment.