mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-23 07:10:23 +00:00
cmake: Add common targets/rules for helper files
Change-Id: I26244eaf04451fd7c3755563953c7b8ad3715613
This commit is contained in:
parent
a85feddaa7
commit
8c2529b90d
@ -252,7 +252,7 @@ endif()
|
||||
|
||||
set (PYTHON_CMD ${PYTHON_EXECUTABLE})
|
||||
|
||||
# Define macros used across all subdirectories
|
||||
# Define macro used for building vkxml generated files
|
||||
macro(run_vk_xml_generate dependency output)
|
||||
add_custom_command(OUTPUT ${output}
|
||||
COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/lvl_genvk.py -registry ${SCRIPTS_DIR}/vk.xml ${output}
|
||||
@ -260,6 +260,24 @@ macro(run_vk_xml_generate dependency output)
|
||||
)
|
||||
endmacro()
|
||||
|
||||
# Custom target for generated vulkan helper file dependencies
|
||||
add_custom_target(generate_helper_files DEPENDS
|
||||
vk_dispatch_table_helper.h
|
||||
vk_enum_string_helper.h
|
||||
vk_struct_size_helper.h
|
||||
vk_struct_size_helper.c
|
||||
vk_safe_struct.h
|
||||
vk_safe_struct.cpp
|
||||
)
|
||||
|
||||
# Rules to build generated helper files
|
||||
run_vk_xml_generate(helper_file_generator.py vk_safe_struct.h)
|
||||
run_vk_xml_generate(helper_file_generator.py vk_safe_struct.cpp)
|
||||
run_vk_xml_generate(helper_file_generator.py vk_struct_size_helper.h)
|
||||
run_vk_xml_generate(helper_file_generator.py vk_struct_size_helper.c)
|
||||
run_vk_xml_generate(helper_file_generator.py vk_enum_string_helper.h)
|
||||
run_vk_xml_generate(dispatch_table_generator.py vk_dispatch_table_helper.h)
|
||||
|
||||
if(NOT WIN32)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user