From d20762a340dc7dc044a1d235475028b50370a288 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 19 Oct 2025 11:40:59 +0300 Subject: [PATCH] Update source groups to match directory structure, in anticipation of an eventual switch to source_group(TREE) under CMake 3.28+ --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e095d8..2a45c60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,14 +24,15 @@ if(CMAKE_VERSION VERSION_GREATER 3.18) # Using target_sources with PRIVATE or PUBLIC on INTERFACE targets requires 3.19 file(GLOB_RECURSE boost_assert_HEADERS CONFIGURE_DEPENDS include/*.hpp) - source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_assert_HEADERS} PREFIX "Header Files") target_sources(boost_assert PRIVATE ${boost_assert_HEADERS}) + source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_assert_HEADERS} PREFIX "include") unset(boost_assert_HEADERS) if(MSVC) # Only Visual Studio needs this, but the generator may also be Ninja target_sources(boost_assert PUBLIC extra/boost_assert.natvis) + source_group(TREE ${PROJECT_SOURCE_DIR}/extra FILES extra/boost_assert.natvis PREFIX "extra") endif()