premake / premake/premake-core

Workspace vpaths overriding project ones

Open
#2,293 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

Hello. I have a question about vpaths inheritance.

I want to make a separate (or rather additional) set of vpaths in my project.

This is the project tree:

src_main
    appframework/
...
    public/
        appframework/
            AppFramework.h
            IAppSystem.h
    premake5.lua

src_main/premake5.lua:

workspace "everything"
...
    vpaths {
        ["Header Files"] = { "**.h", "**.hpp" },
        ["Source Files"] = { "**.c", "**.cpp" },
        ["Shaders"] = { "**.fxc", "**.psh", "**.vsh" },
    }
...
    group "Common"
    include "appframework"

And this is what I have in src_main/appframework/premake5.lua:

local prj = project("appframework")
...
    files {
        ...
    }
    vpaths {
        ["Interface"] = "../public/appframework/**.h"
    }

Seems like Premake only considers the main vpaths (from workspace), but not the vpaths from "appframework" project.
It puts headers from src_main/public/appframework to a "Header Files" filter in the final ".vcxproj.filters" file, but not "Interface".

How can I accomplish the desired functionality?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src_main/premake5.lua and src_main/appframework/premake5.lua, then inspect the generated .vcxproj.filters file to compare workspace and project vpaths. Determine how the two vpaths declarations are combined or overridden; done when the project’s Interface mapping is retained alongside the workspace mappings.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.