Skip to content

Commit

Permalink
Creates folders for gfxr and freedreno in dive solution
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantComm committed Dec 12, 2024
1 parent 2a9dc4b commit ba02173
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dive_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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$")
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions third_party/freedreno/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/framework/decode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/framework/encode/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions third_party/gfxreconstruct/framework/format/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/framework/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions third_party/gfxreconstruct/layer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -82,6 +83,10 @@ GENERATE_LAYER_JSON_FILE(VkLayer_gfxreconstruct_json
$<TARGET_FILE_DIR:VkLayer_gfxreconstruct>/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 "")
Expand Down
8 changes: 8 additions & 0 deletions third_party/gfxreconstruct/scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 4 additions & 0 deletions third_party/gfxreconstruct/tools/capture/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/tools/compress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/tools/convert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/tools/extract/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions third_party/gfxreconstruct/tools/gfxrecon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/tools/info/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/tools/optimize/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/tools/replay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions third_party/gfxreconstruct/tools/tocpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba02173

Please sign in to comment.