mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-23 07:10:23 +00:00
cmake: Move LVL temp/worker targets into subfolder
This sets up cmake to locate the temporary or worker MSVC projects into a subfolder called lvl_cmake_targets. This simply unclutters the Visual Studio Solution Explorer projects pane, and does not affect functionality. Change-Id: I6933d05758d6f174a4f66ceaef51d43627210e4f
This commit is contained in:
parent
4bba61bd78
commit
eb7024602f
@ -24,6 +24,10 @@ if (USE_CCACHE)
|
||||
endif(CCACHE_FOUND)
|
||||
endif()
|
||||
|
||||
# Enable cmake folders
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set(LVL_TARGET_FOLDER lvl_cmake_targets)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(FALLBACK_CONFIG_DIRS "/etc/xdg" CACHE STRING
|
||||
"Search path to use when XDG_CONFIG_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant.")
|
||||
@ -337,6 +341,7 @@ add_custom_target(generate_helper_files DEPENDS
|
||||
vk_typemap_helper.h
|
||||
spirv_tools_commit_id.h
|
||||
)
|
||||
set_target_properties(generate_helper_files PROPERTIES FOLDER ${LVL_TARGET_FOLDER})
|
||||
|
||||
# Rules to build generated helper files
|
||||
run_vk_xml_generate(loader_extension_generator.py vk_layer_dispatch_table.h)
|
||||
|
@ -104,6 +104,7 @@ if (WIN32)
|
||||
add_dependencies(asm_offset generate_helper_files loader_gen_files)
|
||||
add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset MASM)
|
||||
add_custom_target(loader_asm_gen_files DEPENDS gen_defines.asm)
|
||||
set_target_properties(loader_asm_gen_files PROPERTIES FOLDER ${LVL_TARGET_FOLDER})
|
||||
else()
|
||||
message(WARNING "Could not find working MASM assebler\n${ASM_FAILURE_MSG}")
|
||||
set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain.c)
|
||||
@ -137,6 +138,7 @@ add_custom_target(loader_gen_files DEPENDS
|
||||
vk_loader_extensions.h
|
||||
vk_loader_extensions.c
|
||||
)
|
||||
set_target_properties(loader_gen_files PROPERTIES FOLDER ${LVL_TARGET_FOLDER})
|
||||
|
||||
if (WIN32)
|
||||
# Use static MSVCRT libraries
|
||||
|
@ -97,6 +97,7 @@ else()
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VALIDATE_DOC} vkvalidatelayerdoc.ps1
|
||||
VERBATIM
|
||||
)
|
||||
set_target_properties(binary-dir-symlinks PROPERTIES FOLDER ${LVL_TARGET_FOLDER})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -22,7 +22,8 @@ if (WIN32)
|
||||
COMMAND copy ${src_json} ${dst_json}
|
||||
VERBATIM
|
||||
)
|
||||
add_dependencies(${config_file}-json ${config_file})
|
||||
add_dependencies(${config_file}-json ${config_file})
|
||||
set_target_properties(${config_file}-json PROPERTIES FOLDER ${LVL_TARGET_FOLDER})
|
||||
endforeach(config_file)
|
||||
endif()
|
||||
else()
|
||||
@ -44,6 +45,7 @@ if (WIN32)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DEF_FILE} VkLayer_${target}.def
|
||||
VERBATIM
|
||||
)
|
||||
set_target_properties(copy-${target}-def-file PROPERTIES FOLDER ${LVL_TARGET_FOLDER})
|
||||
add_library(VkLayer_${target} SHARED ${ARGN} VkLayer_${target}.def)
|
||||
add_dependencies(VkLayer_${target} generate_helper_files VkLayer_utils)
|
||||
endmacro()
|
||||
|
Loading…
Reference in New Issue
Block a user