我正在使用Visual Studio 2017和premake 5程序。 为了生成项目,我的工作区放在premake5.lua文件中。
因为我的项目是从较旧的解决方案中引用其他项目,所以我可以将它们基本包含在自己的premake5.lua文件中,以生成该特定项目,例如here。如您所见,整个源代码和premake5.lua作为github子模块包含在当前解决方案中,因此我无法更改该premake5.lua文件。
解决方案premake5.lua文件如下:
workspace WorkSpaceName
...
-- glfw project
include "git submodule premake5.lua filename"
-- main project
project MainProjectName
links
{
"GLFW",
...
}
...
截至目前,在Visual Studio中,我得到了类似的文件结构
Solution
- Main project (with premake5.lua file)
- glfw project (github submodule, with own premake5.lua)
- ... (other projects in solution)
我的问题:我可以在不触摸git子模块中的文件的情况下,从主项目中的premake5.lua文件内部将解决方案子文件夹中的glfw项目移动吗?然后我的文件结构如下:
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)
亲切的问候
答案 0 :(得分:0)
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"