我有一个主要的 premake4.lua 脚本:
solution "MySolution"
language "c++"
newoption = {
trigger = "my-option",
description = "This is an option"
}
include "../my_library"
我想根据_OPTIONS的内容在包含的脚本( ../my_library/premake4.lua )中旋转逻辑:
if _OPTIONS["my-option"] then
project "myStaticLibrary"
kind "StaticLib"
else
project "mySharedLibrary"
kind "SharedLib"
end
files "foo.cpp"
如何在包含的 premake4 脚本范围内获取 _OPTIONS?