hunting/utils/ConfigBase/build/config_base.cmake
2024-06-15 08:36:44 +08:00

12 lines
464 B
CMake

function(config_owner target)
get_target_property(source_files "${target}" SOURCES)
foreach(source_file ${source_files})
get_property(defs SOURCE "${source_file}"
PROPERTY COMPILE_DEFINITIONS)
get_filename_component(file_name "${source_file}" NAME)
list(APPEND defs "CONFIG_OWNER")
set_property(
SOURCE "${source_file}"
PROPERTY COMPILE_DEFINITIONS ${defs})
endforeach()
endfunction()