Mirror directory structure in IDE virtual folders ('filters') #1845
-
I'm using VS2019 and finding that the included files aren't being put into filters based on the directory structure as mentioned at the top of this page. I'd like "proj/someModule/moduleMain.cpp" to be reflected by the IDE but I can't figure out how to do so (or why it's not doing so already as the default behaviour). |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Let's say I have the following project structure:
Now I define my project in -- premake5.lua
workspace "MySolution"
architecture "x86_64"
configurations {
"Debug",
"Release"
}
project "MyModule"
location "MyModule"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
files {
"%{prj.name}/src/**.cpp",
"%{prj.name}/include/**.hpp",
"%{prj.name}/vendor/**.hpp"
}
includedirs {
"%{prj.name}/include",
"%{prj.name}/vendor"
} And when I generate a solution with So what problem do you have exactly? |
Beta Was this translation helpful? Give feedback.
-
Looks like this only works if project location is same as source location. So it doesn't work when I do this: `workspace "MySolution"
Is this intended? |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for the answer. Filters are fine, but can I also retain the folder structure in src? |
Beta Was this translation helpful? Give feedback.
Let's say I have the following project structure:
Now I define my project in
premake5.lua
like this: