【问题标题】:Premake exclude project预制排除项目
【发布时间】:2020-03-17 02:31:09
【问题描述】:

我在根目录中有一个主要的 premake lua 文件,其中包含工作区声明和一些基本配置,并且在该文件的末尾我包含了项目。

workspace "Test"
    CONFIGURATIONS

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

在 linux 上,我想排除“项目 3”,因为不需要在那里编译它。 我尝试定义系统并使用过滤器,但仍会生成文件。

要在 linux 上生成 makefile,我使用 premake gmake2

【问题讨论】:

    标签: c++ premake


    【解决方案1】:

    关于 Premake5 的最新版本:

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

    在旧版本上:

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

    【讨论】:

      猜你喜欢
      • 2014-02-05
      • 2013-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-26
      • 2012-03-20
      相关资源
      最近更新 更多