Skip to content

Mirror directory structure in IDE virtual folders ('filters') #1845

Answered by KyrietS
BlackxSnow asked this question in Q&A
Discussion options

You must be logged in to vote

Let's say I have the following project structure:

MySolution/
├── MyModule
│   ├── include
│   │   └── someHeader.hpp
│   ├── src
│   │   └── main.cpp
│   └── vendor
│       └── someLibrary
│           └── someLibraryHeader.hpp
└── premake5.lua

Now I define my project in premake5.lua like this:

-- 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"

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@BlackxSnow
Comment options

@nickclark2016
Comment options

Answer selected by BlackxSnow
Comment options

You must be logged in to vote
1 reply
@KyrietS
Comment options

Comment options

You must be logged in to vote
1 reply
@KyrietS
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants