diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2018-02-01 09:27:03 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2018-02-05 13:15:30 -0700 |
| commit | 6d51575e31384a23e5dc172c13d60c121f6135b7 (patch) | |
| tree | 31db685e0dc4d4dc7eaa4ad0be05eb6767fe36cb | |
| parent | fb2d0daadad08234b7706355fa33c32fa86d85e1 (diff) | |
| download | usermoji-6d51575e31384a23e5dc172c13d60c121f6135b7.tar.xz | |
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
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | icd/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | layers/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | loader/CMakeLists.txt | 2 |
4 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 831a61a0..34aeb1ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt index 363a41a5..88f5d2a0 100644 --- a/icd/CMakeLists.txt +++ b/icd/CMakeLists.txt @@ -37,6 +37,7 @@ if (WIN32) COMMAND copy ${src_json} ${dst_json} VERBATIM ) + set_target_properties(${config_file}-json PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) endforeach(config_file) else() foreach (config_file ${ICD_JSON_FILES}) @@ -71,6 +72,7 @@ add_custom_target(generate_icd_files DEPENDS mock_icd.h mock_icd.cpp ) +set_target_properties(generate_icd_files PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) if (WIN32) macro(add_vk_icd target) @@ -79,6 +81,7 @@ if (WIN32) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DEF_FILE} VkICD_${target}.def VERBATIM ) + set_target_properties(copy-${target}-def-file PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) add_library(VkICD_${target} SHARED ${ARGN} VkICD_${target}.def) add_dependencies(VkICD_${target} generate_icd_files) #target_link_Libraries(VkICD_${target} VkICD_utils) diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index d3b13e50..83dfafe0 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -48,6 +48,7 @@ if (WIN32) COMMAND copy ${src_json} ${dst_json} VERBATIM ) + set_target_properties(${config_file}-json PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) endforeach(config_file) else() foreach (config_file ${LAYER_JSON_FILES}) @@ -67,6 +68,7 @@ if (WIN32) COMMAND copy ${src_val_msgs} ${dst_val_msgs} VERBATIM ) + set_target_properties(vk_validation_error_messages PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) endif() else() # extra setup for out-of-tree builds @@ -119,6 +121,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) target_link_Libraries(VkLayer_${target} VkLayer_utils) diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 0def2a26..816e4114 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -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 |
