Premake exclude project

女生的网名这么多〃 提交于 2021-02-11 14:34:20

问题


I have a main premake lua file in root with the workspace declaration and some basic configurations and at the end of that file I include the projects.

workspace "Test"
    CONFIGURATIONS

    include "Project1"
    include "Project2"
    include "Project3"

On linux I want to exclude "Project 3" as it's not needed to compile it there. I tried defining systems and using filters but the file still gets generated.

To generate the makefiles on linux I use premake gmake2.


回答1:


On recent versions of Premake5:

if _TARGET_OS ~= "linux" then
   include "Project3"
end

On older versions:

if _OS ~= "linux" then
   include "Project3"
end


来源:https://stackoverflow.com/questions/60686766/premake-exclude-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!