switching to cmake; alyson setup
This commit is contained in:
parent
9504620227
commit
23a40216de
20 changed files with 307 additions and 125300 deletions
33
cmake/utils.cmake
Normal file
33
cmake/utils.cmake
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
function(put_targets_into_folder)
|
||||
set(oneValueArgs FOLDER)
|
||||
set(multiValueArgs TARGETS)
|
||||
cmake_parse_arguments(ARGS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
foreach(target ${ARGS_TARGETS})
|
||||
# Check if target exists
|
||||
if (NOT TARGET ${target})
|
||||
message(FATAL_ERROR "${target} target not found")
|
||||
endif()
|
||||
|
||||
# Get the actual target (if it is aliased)
|
||||
get_target_property(actual_target ${target} ALIASED_TARGET)
|
||||
if (NOT actual_target)
|
||||
set(actual_target ${target})
|
||||
endif()
|
||||
|
||||
# Set the folder property for the target
|
||||
set_target_properties(${actual_target} PROPERTIES FOLDER ${ARGS_FOLDER})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
||||
function(find_files var_name path)
|
||||
set(sources)
|
||||
foreach(ext ${ARGN})
|
||||
file(GLOB_RECURSE files "${path}/*.${ext}")
|
||||
list(APPEND sources ${files})
|
||||
endforeach()
|
||||
set(${var_name} ${${var_name}} ${sources} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue