diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-06-24 16:38:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-24 16:38:51 -0400 |
| commit | 50b442578b3cfa11aa4590f56e99e64dddbc555e (patch) | |
| tree | 571932b0c52d556f46cdf6ed130d98962457e7e0 /premake5.lua | |
| parent | f1b41a71be938b8711ee0fff0130185f512d2336 (diff) | |
xcode4 premake support (#2300)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Attempt to make premake work for xcode4.
* Make architecture ARM64.
* Using ARM64 didn't make any difference.
Diffstat (limited to 'premake5.lua')
| -rw-r--r-- | premake5.lua | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/premake5.lua b/premake5.lua index ecd2422dd..04649689e 100644 --- a/premake5.lua +++ b/premake5.lua @@ -246,10 +246,30 @@ newoption { buildoptions { "-D_GNU_SOURCE" } end + function getPlatforms(targetInfo) + if _ACTION == "xcode4" then + local arch = targetInfo.arch + local valueMap = + { + x86_64 = "x64", + arm = "aarch64", + } + + local value = valueMap[arch:lower()] + if value == nil then + return { arch } + else + return { value } + end + else + return { "x86", "x64", "aarch64" } + end + end + workspace "slang" -- We will support debug/release configuration and x86/x64 builds. configurations { "Debug", "Release" } - platforms { "x86", "x64", "aarch64" } + platforms(getPlatforms(targetInfo)) if buildLocation then location(buildLocation) @@ -281,6 +301,9 @@ newoption { -- Our `x64` platform should (obviously) target the x64 -- architecture and similarly for x86. + -- + -- https://premake.github.io/docs/architecture/ + -- filter { "platforms:x64" } architecture "x64" filter { "platforms:x86" } @@ -288,7 +311,6 @@ newoption { filter { "platforms:aarch64"} architecture "ARM" - filter { "toolset:clang or gcc*" } -- Makes all symbols hidden by default unless explicitly 'exported' buildoptions { "-fvisibility=hidden" } |
