From ba02173102dc1c3fc9da58981fbffbd1a5d11d11 Mon Sep 17 00:00:00 2001 From: Grant Commodore Date: Thu, 12 Dec 2024 14:24:34 -0800 Subject: [PATCH] Creates folders for gfxr and freedreno in dive solution --- dive_core/CMakeLists.txt | 5 +++++ third_party/freedreno/CMakeLists.txt | 5 +++++ .../gfxreconstruct/framework/application/CMakeLists.txt | 1 + .../gfxreconstruct/framework/decode/CMakeLists.txt | 1 + .../gfxreconstruct/framework/encode/CMakeLists.txt | 1 + .../gfxreconstruct/framework/format/CMakeLists.txt | 4 ++++ .../gfxreconstruct/framework/graphics/CMakeLists.txt | 1 + third_party/gfxreconstruct/framework/util/CMakeLists.txt | 1 + third_party/gfxreconstruct/layer/CMakeLists.txt | 5 +++++ third_party/gfxreconstruct/scripts/CMakeLists.txt | 8 ++++++++ .../gfxreconstruct/tools/capture-vulkan/CMakeLists.txt | 4 ++++ third_party/gfxreconstruct/tools/capture/CMakeLists.txt | 4 ++++ third_party/gfxreconstruct/tools/compress/CMakeLists.txt | 1 + third_party/gfxreconstruct/tools/convert/CMakeLists.txt | 1 + third_party/gfxreconstruct/tools/extract/CMakeLists.txt | 1 + third_party/gfxreconstruct/tools/gfxrecon/CMakeLists.txt | 4 ++++ third_party/gfxreconstruct/tools/info/CMakeLists.txt | 1 + third_party/gfxreconstruct/tools/optimize/CMakeLists.txt | 1 + third_party/gfxreconstruct/tools/replay/CMakeLists.txt | 1 + third_party/gfxreconstruct/tools/tocpp/CMakeLists.txt | 1 + 20 files changed, 51 insertions(+) diff --git a/dive_core/CMakeLists.txt b/dive_core/CMakeLists.txt index a4566f5b8..f1f014866 100644 --- a/dive_core/CMakeLists.txt +++ b/dive_core/CMakeLists.txt @@ -107,6 +107,10 @@ add_custom_command( ) add_custom_target(freedreno_devices_header ALL DEPENDS ${FREEDRENO_DEVICES_HDR_FILE}) +if(MSVC) + set_target_properties(freedreno_devices_header PROPERTIES FOLDER "freedreno") +endif() + file(GLOB_RECURSE HDR_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h") file(GLOB_RECURSE SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") list(FILTER SRC_FILES EXCLUDE REGEX "_tests.cpp$") @@ -185,6 +189,7 @@ target_compile_definitions(freedreno_ir3 PRIVATE -DHAVE_STRUCT_TIMESPEC ) target_sources(freedreno_ir3 PRIVATE "${THIRDPARTY_DIRECTORY}/mesa/src/util/google_dive_ext.c") +set_target_properties(freedreno_ir3 PROPERTIES FOLDER "freedreno") else() target_compile_definitions(freedreno_ir3 PRIVATE -DHAVE_ENDIAN_H diff --git a/third_party/freedreno/CMakeLists.txt b/third_party/freedreno/CMakeLists.txt index b6d14a9e5..48ab01aee 100644 --- a/third_party/freedreno/CMakeLists.txt +++ b/third_party/freedreno/CMakeLists.txt @@ -47,6 +47,11 @@ set_target_properties(${target_name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/" ) + +if(MSVC) + set_target_properties(${target_name} PROPERTIES FOLDER "freedreno") +endif() + add_custom_command(TARGET ${target_name} POST_BUILD COMMAND "${ANDROID_TOOLCHAIN_ROOT}/bin/llvm-strip" --strip-unneeded "${CMAKE_BINARY_DIR}/bin/lib${target_name}.so" diff --git a/third_party/gfxreconstruct/framework/application/CMakeLists.txt b/third_party/gfxreconstruct/framework/application/CMakeLists.txt index 5b59894ea..031597b7b 100644 --- a/third_party/gfxreconstruct/framework/application/CMakeLists.txt +++ b/third_party/gfxreconstruct/framework/application/CMakeLists.txt @@ -30,6 +30,7 @@ add_library(gfxrecon_application STATIC "") if(MSVC) target_compile_options(gfxrecon_application PRIVATE /wd4244 /wd4018) + set_target_properties(gfxrecon_application PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon_application diff --git a/third_party/gfxreconstruct/framework/decode/CMakeLists.txt b/third_party/gfxreconstruct/framework/decode/CMakeLists.txt index 430d24e85..fae6919e0 100644 --- a/third_party/gfxreconstruct/framework/decode/CMakeLists.txt +++ b/third_party/gfxreconstruct/framework/decode/CMakeLists.txt @@ -30,6 +30,7 @@ add_library(gfxrecon_decode STATIC "") if(MSVC) target_compile_options(gfxrecon_decode PRIVATE /wd4996 /wd4267 /wd4244 /wd4018 /wd4101) + set_target_properties(gfxrecon_decode PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon_decode diff --git a/third_party/gfxreconstruct/framework/encode/CMakeLists.txt b/third_party/gfxreconstruct/framework/encode/CMakeLists.txt index d243a273b..1e43f4977 100644 --- a/third_party/gfxreconstruct/framework/encode/CMakeLists.txt +++ b/third_party/gfxreconstruct/framework/encode/CMakeLists.txt @@ -30,6 +30,7 @@ add_library(gfxrecon_encode STATIC "") if(MSVC) target_compile_options(gfxrecon_encode PRIVATE /wd4267 /wd4244) + set_target_properties(gfxrecon_encode PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon_encode diff --git a/third_party/gfxreconstruct/framework/format/CMakeLists.txt b/third_party/gfxreconstruct/framework/format/CMakeLists.txt index 4a58e7bad..ef7f6e2c1 100644 --- a/third_party/gfxreconstruct/framework/format/CMakeLists.txt +++ b/third_party/gfxreconstruct/framework/format/CMakeLists.txt @@ -28,6 +28,10 @@ add_library(gfxrecon_format STATIC "") +if(MSVC) + set_target_properties(gfxrecon_format PROPERTIES FOLDER "gfxreconstruct") +endif() + target_sources(gfxrecon_format PRIVATE ${CMAKE_CURRENT_LIST_DIR}/api_call_id.h diff --git a/third_party/gfxreconstruct/framework/graphics/CMakeLists.txt b/third_party/gfxreconstruct/framework/graphics/CMakeLists.txt index 675b39c31..790d3691b 100644 --- a/third_party/gfxreconstruct/framework/graphics/CMakeLists.txt +++ b/third_party/gfxreconstruct/framework/graphics/CMakeLists.txt @@ -29,6 +29,7 @@ add_library(gfxrecon_graphics STATIC "") if(MSVC) target_compile_options(gfxrecon_graphics PRIVATE /wd4996 /wd4267 /wd4244) + set_target_properties(gfxrecon_graphics PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon_graphics diff --git a/third_party/gfxreconstruct/framework/util/CMakeLists.txt b/third_party/gfxreconstruct/framework/util/CMakeLists.txt index 2647833cb..0492065ad 100644 --- a/third_party/gfxreconstruct/framework/util/CMakeLists.txt +++ b/third_party/gfxreconstruct/framework/util/CMakeLists.txt @@ -30,6 +30,7 @@ add_library(gfxrecon_util STATIC "") if(MSVC) target_compile_options(gfxrecon_util PRIVATE /wd4996 /wd4267 /wd4334) + set_target_properties(gfxrecon_util PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon_util diff --git a/third_party/gfxreconstruct/layer/CMakeLists.txt b/third_party/gfxreconstruct/layer/CMakeLists.txt index 99795eb9e..f380a2d7d 100644 --- a/third_party/gfxreconstruct/layer/CMakeLists.txt +++ b/third_party/gfxreconstruct/layer/CMakeLists.txt @@ -65,6 +65,7 @@ target_link_libraries(VkLayer_gfxreconstruct gfxrecon_encode gfxrecon_graphics g if(MSVC) target_link_libraries(VkLayer_gfxreconstruct psapi.lib) + set_target_properties(VkLayer_gfxreconstruct PROPERTIES FOLDER "gfxreconstruct") endif() common_build_directives(VkLayer_gfxreconstruct) @@ -82,6 +83,10 @@ GENERATE_LAYER_JSON_FILE(VkLayer_gfxreconstruct_json $/VkLayer_gfxreconstruct.json ) +if(MSVC) + set_target_properties(VkLayer_gfxreconstruct_json PROPERTIES FOLDER "gfxreconstruct") +endif() + if(UNIX) # Generate a JSON file that can be installed into system directories (w/o the "./" prefix in the library_path) set(RELATIVE_PATH_PREFIX "") diff --git a/third_party/gfxreconstruct/scripts/CMakeLists.txt b/third_party/gfxreconstruct/scripts/CMakeLists.txt index 7223423f3..f127254cf 100644 --- a/third_party/gfxreconstruct/scripts/CMakeLists.txt +++ b/third_party/gfxreconstruct/scripts/CMakeLists.txt @@ -28,6 +28,10 @@ if (D3D12_SUPPORT) add_custom_target(gfxrecon-optimize-renamed.py ALL) + if(MSVC) + set_target_properties(gfxrecon-optimize-renamed.py PROPERTIES FOLDER "gfxreconstruct") + endif() + add_custom_command(TARGET gfxrecon-optimize-renamed.py DEPENDS ${CMAKE_SOURCE_SOURCE_DIR}/gfxrecon-optimize-renamed.py COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gfxrecon-optimize-renamed.py ${CMAKE_CURRENT_BINARY_DIR}/gfxrecon-optimize-renamed.py) @@ -37,6 +41,10 @@ if (D3D12_SUPPORT) add_custom_target(gfxrecon-replay-renamed.py ALL) + if(MSVC) + set_target_properties(gfxrecon-replay-renamed.py PROPERTIES FOLDER "gfxreconstruct") + endif() + add_custom_command(TARGET gfxrecon-replay-renamed.py DEPENDS ${CMAKE_SOURCE_SOURCE_DIR}/gfxrecon-replay-renamed.py COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gfxrecon-replay-renamed.py ${CMAKE_CURRENT_BINARY_DIR}/gfxrecon-replay-renamed.py) diff --git a/third_party/gfxreconstruct/tools/capture-vulkan/CMakeLists.txt b/third_party/gfxreconstruct/tools/capture-vulkan/CMakeLists.txt index 19d553fce..737e31c22 100644 --- a/third_party/gfxreconstruct/tools/capture-vulkan/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/capture-vulkan/CMakeLists.txt @@ -1,5 +1,9 @@ add_custom_target(gfxrecon-capture-vulkan.py ALL) +if(MSVC) + set_target_properties(gfxrecon-capture-vulkan.py PROPERTIES FOLDER "gfxreconstruct") +endif() + add_custom_command(TARGET gfxrecon-capture-vulkan.py DEPENDS ${CMAKE_SOURCE_SOURCE_DIR}/gfxrecon-capture-vulkan.py COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gfxrecon-capture-vulkan.py ${CMAKE_CURRENT_BINARY_DIR}/gfxrecon-capture-vulkan.py) diff --git a/third_party/gfxreconstruct/tools/capture/CMakeLists.txt b/third_party/gfxreconstruct/tools/capture/CMakeLists.txt index 6b1188051..1a9941529 100644 --- a/third_party/gfxreconstruct/tools/capture/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/capture/CMakeLists.txt @@ -1,5 +1,9 @@ add_custom_target(gfxrecon-capture.py ALL) +if(MSVC) + set_target_properties(gfxrecon-capture.py PROPERTIES FOLDER "gfxreconstruct") +endif() + add_custom_command(TARGET gfxrecon-capture.py DEPENDS ${CMAKE_SOURCE_SOURCE_DIR}/gfxrecon-capture.py COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gfxrecon-capture.py ${CMAKE_CURRENT_BINARY_DIR}/gfxrecon-capture.py) diff --git a/third_party/gfxreconstruct/tools/compress/CMakeLists.txt b/third_party/gfxreconstruct/tools/compress/CMakeLists.txt index 31868e862..4e1dde3d2 100644 --- a/third_party/gfxreconstruct/tools/compress/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/compress/CMakeLists.txt @@ -30,6 +30,7 @@ add_executable(gfxrecon-compress "") if(MSVC) target_compile_options(gfxrecon-compress PRIVATE /wd4244) + set_target_properties(gfxrecon-compress PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon-compress diff --git a/third_party/gfxreconstruct/tools/convert/CMakeLists.txt b/third_party/gfxreconstruct/tools/convert/CMakeLists.txt index a2e7e88af..1524bedd4 100644 --- a/third_party/gfxreconstruct/tools/convert/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/convert/CMakeLists.txt @@ -28,6 +28,7 @@ add_executable(gfxrecon-convert "") if(MSVC) target_compile_options(gfxrecon-convert PRIVATE /wd4244) target_link_libraries(gfxrecon-convert psapi.lib) + set_target_properties(gfxrecon-convert PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon-convert diff --git a/third_party/gfxreconstruct/tools/extract/CMakeLists.txt b/third_party/gfxreconstruct/tools/extract/CMakeLists.txt index 498d0055f..ad4f7e198 100644 --- a/third_party/gfxreconstruct/tools/extract/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/extract/CMakeLists.txt @@ -31,6 +31,7 @@ add_executable(gfxrecon-extract "") if(MSVC) target_compile_options(gfxrecon-extract PRIVATE /wd4244) target_link_libraries(gfxrecon-extract psapi.lib) + set_target_properties(gfxrecon-extract PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon-extract diff --git a/third_party/gfxreconstruct/tools/gfxrecon/CMakeLists.txt b/third_party/gfxreconstruct/tools/gfxrecon/CMakeLists.txt index 614271c1a..bc307a280 100644 --- a/third_party/gfxreconstruct/tools/gfxrecon/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/gfxrecon/CMakeLists.txt @@ -1,5 +1,9 @@ add_custom_target(gfxrecon.py ALL) +if(MSVC) + set_target_properties(gfxrecon.py PROPERTIES FOLDER "gfxreconstruct") +endif() + add_custom_command(TARGET gfxrecon.py DEPENDS ${CMAKE_SOURCE_SOURCE_DIR}/gfxrecon.py COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/gfxrecon.py ${CMAKE_CURRENT_BINARY_DIR}/gfxrecon.py) diff --git a/third_party/gfxreconstruct/tools/info/CMakeLists.txt b/third_party/gfxreconstruct/tools/info/CMakeLists.txt index e91fd558d..9f6d56838 100644 --- a/third_party/gfxreconstruct/tools/info/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/info/CMakeLists.txt @@ -31,6 +31,7 @@ add_executable(gfxrecon-info "") if(MSVC) target_compile_options(gfxrecon-info PRIVATE /wd4244) target_link_libraries(gfxrecon-info psapi.lib) + set_target_properties(gfxrecon-info PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon-info diff --git a/third_party/gfxreconstruct/tools/optimize/CMakeLists.txt b/third_party/gfxreconstruct/tools/optimize/CMakeLists.txt index c9db79580..39103db1c 100644 --- a/third_party/gfxreconstruct/tools/optimize/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/optimize/CMakeLists.txt @@ -31,6 +31,7 @@ add_executable(gfxrecon-optimize "") if(MSVC) target_compile_options(gfxrecon-optimize PRIVATE /wd4244) target_link_libraries(gfxrecon-optimize psapi.lib) + set_target_properties(gfxrecon-optimize PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon-optimize diff --git a/third_party/gfxreconstruct/tools/replay/CMakeLists.txt b/third_party/gfxreconstruct/tools/replay/CMakeLists.txt index 19a8e9fba..1e1f27c02 100644 --- a/third_party/gfxreconstruct/tools/replay/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/replay/CMakeLists.txt @@ -66,6 +66,7 @@ if (MSVC) else() target_link_options(gfxrecon-replay PUBLIC "LINKER:/Include:gfxrecon_disable_popup_result") endif() + set_target_properties(gfxrecon-replay PROPERTIES FOLDER "gfxreconstruct") endif() # A multithreaded Vulkan driver loaded through dlopen() mechanism diff --git a/third_party/gfxreconstruct/tools/tocpp/CMakeLists.txt b/third_party/gfxreconstruct/tools/tocpp/CMakeLists.txt index 1e614e412..e87984daa 100644 --- a/third_party/gfxreconstruct/tools/tocpp/CMakeLists.txt +++ b/third_party/gfxreconstruct/tools/tocpp/CMakeLists.txt @@ -3,6 +3,7 @@ add_executable(gfxrecon-tocpp "") if(MSVC) target_compile_options(gfxrecon-tocpp PRIVATE /wd4244) target_link_libraries(gfxrecon-tocpp psapi.lib) + set_target_properties(gfxrecon-tocpp PROPERTIES FOLDER "gfxreconstruct") endif() target_sources(gfxrecon-tocpp