Skip to content

Commit c18c8ae

Browse files
committed
create NBL_ADJUST_FOLDERS and use for a few namespaces to group targets in IDE, update examples_tests
1 parent ef0f206 commit c18c8ae

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

3rdparty/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ nbl_adjust_definitions()
520520
add_custom_target(3rdparty)
521521
add_dependencies(3rdparty ${NBL_3RDPARTY_TARGETS})
522522

523+
NBL_ADJUST_FOLDERS(3rdaprty)
524+
523525
nbl_install_dir("${CMAKE_CURRENT_SOURCE_DIR}/parallel-hashmap/parallel_hashmap")
524526

525527
# parent scope exports, must be at the end of the file

cmake/common.cmake

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,4 +1215,17 @@ macro(NBL_DOCKER)
12151215
RESULT_VARIABLE DOCKER_EXIT_CODE
12161216
OUTPUT_VARIABLE DOCKER_OUTPUT_VAR
12171217
)
1218-
endmacro()
1218+
endmacro()
1219+
1220+
function(NBL_ADJUST_FOLDERS NS)
1221+
NBL_GET_ALL_TARGETS(TARGETS)
1222+
foreach(T IN LISTS TARGETS)
1223+
get_target_property(NBL_FOLDER ${T} FOLDER)
1224+
1225+
if(NBL_FOLDER)
1226+
set_target_properties(${T} PROPERTIES FOLDER "nabla/${NS}/${NBL_FOLDER}")
1227+
else()
1228+
set_target_properties(${T} PROPERTIES FOLDER "nabla/${NS}")
1229+
endif()
1230+
endforeach()
1231+
endfunction()

examples_tests

src/nbl/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,3 +777,5 @@ else()
777777
endif()
778778

779779
nbl_install_program_spec("${DXC_DLL}" "nbl/3rdparty/dxc")
780+
781+
NBL_ADJUST_FOLDERS(src)

tools/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ add_subdirectory(xxHash256)
33

44
if(NBL_BUILD_IMGUI)
55
add_subdirectory(nite)
6-
endif()
6+
endif()
7+
8+
NBL_ADJUST_FOLDERS(tools)

0 commit comments

Comments
 (0)