Search code examples
visual-studio-2017premake

Move project into a solution (sub)folder (using premake5/VisualStudio2017)


I'm using Visual Studio 2017 and the premake 5 programs. To generate my projects I have my workspace in my premake5.lua file.

Becose my project is referencing other projects from older solutions, I can just include those basicaly with there own premake5.lua file to generate that specific project, for example shown here. As you can see, the whole source code and premake5.lua is in included as a github submodule into my current solution, so I cannot change that premake5.lua file.

The solutions premake5.lua file looks like:

workspace WorkSpaceName
    ...

-- glfw project
include "git submodule premake5.lua filename"

-- main project
project MainProjectName
    links
    {
        "GLFW",
        ...
    }
    ...

As of now, inside VisualStudio I got a file structure like

Solution
    - Main project (with premake5.lua file)
    - glfw project (github submodule, with own premake5.lua)
    - ...          (other projects in solution)

My question: Can I move the project glfw inside a solution subfolder from inside the premake5.lua file in the main project without touching the file from the git submodule? Then my file structure would look like:

Solution
    - Main project (with premake5.lua file)
    - <FolderName>
        - glfw project (github submodule, with own premake5.lua)
        - ... (other projects in solution/<FolderName>)
    - ...     (other projects in solution)

Kind regards


Solution

  • I found my own solution afther 2 long hours of searching:

    By adding the projects to a group, they appear in a virtual folder.

    group "Dependecies"
        include "git submodule premake5.lua filename"
    group "" -- end of "Dependensies"