mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
VS: Fix VS_SOLUTION_ITEMS for absolute paths
This was missed in commit 0bb13ba0e6 (VS: Add support for Visual Studio
solution items, 2024-10-27).
Fixes: #26593
This commit is contained in:
@@ -560,7 +560,10 @@ void cmGlobalVisualStudio14Generator::AddSolutionItems(cmLocalGenerator* root)
|
||||
|
||||
for (const std::string& relativePath : cmList(n)) {
|
||||
pathComponents[2] = relativePath;
|
||||
std::string fullPath = cmSystemTools::JoinPath(pathComponents);
|
||||
|
||||
std::string fullPath = cmSystemTools::FileIsFullPath(relativePath)
|
||||
? relativePath
|
||||
: cmSystemTools::JoinPath(pathComponents);
|
||||
|
||||
cmSourceGroup* sg = makefile->FindSourceGroup(fullPath, sourceGroups);
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
set_property(DIRECTORY APPEND PROPERTY VS_SOLUTION_ITEMS solution-item-0-1.txt solution-item-1-1.txt solution-item-2-1.txt solution-item-2-2.txt)
|
||||
set_property(DIRECTORY APPEND PROPERTY VS_SOLUTION_ITEMS
|
||||
solution-item-0-1.txt
|
||||
solution-item-1-1.txt
|
||||
"${CMAKE_CURRENT_LIST_DIR}/solution-item-2-1.txt"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/solution-item-2-2.txt")
|
||||
source_group("Outer Group" FILES solution-item-1-1.txt)
|
||||
source_group("Outer Group/Inner Group" REGULAR_EXPRESSION "solution-item-2-[0-9]+\\.txt")
|
||||
add_subdirectory(SolutionItems)
|
||||
|
||||
Reference in New Issue
Block a user