Skip to content

Commit

Permalink
Chri7325/cocoa build (protocolbuffers#15)
Browse files Browse the repository at this point in the history
* premake: Use _PLATFORM booleans to clean up platform checks

* premake: Remove all winuwp arm configurations as it is deprecated

* premake: Add cocoa configurations or remove unneeded mobile configurations
  • Loading branch information
chri7325 authored Sep 10, 2020
1 parent 86a5218 commit b40edf3
Showing 1 changed file with 102 additions and 34 deletions.
136 changes: 102 additions & 34 deletions protobuf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ project "protobuf"
-- configurations
-- -------------------------------------------------------------

if (os.is("windows") and not _TARGET_IS_WINUWP) then
if (_PLATFORM_WINDOWS) then
-- -------------------------------------------------------------
-- configuration { "windows" }
-- -------------------------------------------------------------
Expand Down Expand Up @@ -163,13 +163,13 @@ project "protobuf"
-- -------------------------------------------------------------
end

if (os.is("linux") and not _OS_IS_ANDROID) then
if (_PLATFORM_LINUX) then
-- -------------------------------------------------------------
-- configuration { "linux" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_linux.lua")

-- project specific configuration settings
Expand Down Expand Up @@ -231,7 +231,7 @@ project "protobuf"
-- -------------------------------------------------------------
end

if (os.is("macosx") and not _OS_IS_IOS and not _OS_IS_ANDROID) then
if (_PLATFORM_MACOS) then
-- -------------------------------------------------------------
-- configuration { "macosx" }
-- -------------------------------------------------------------
Expand Down Expand Up @@ -275,9 +275,101 @@ project "protobuf"
-- -------------------------------------------------------------
end

if (_OS_IS_IOS) then
if (_PLATFORM_COCOA) then
-- -------------------------------------------------------------
-- configuration { "cocoa*" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_cocoa.lua")

-- project specific configuration settings

configuration { "cocoa*" }

defines {
"HAVE_PTHREAD",
}

-- -------------------------------------------------------------
-- configuration { "cocoa_arm64_debug" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_cocoa_arm64_debug.lua")

-- project specific configuration settings

-- configuration { "cocoa_arm64_debug" }

-- -------------------------------------------------------------
-- configuration { "cocoa_arm64_release" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_cocoa_arm64_release.lua")

-- project specific configuration settings

-- configuration { "cocoa_arm64_release" }

-- -------------------------------------------------------------
-- configuration { "cocoa_sim64_debug" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_cocoa_sim64_debug.lua")

-- project specific configuration settings

-- configuration { "cocoa_sim64_debug" }

-- -------------------------------------------------------------
-- configuration { "cocoa_sim64_release" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_cocoa_sim64_release.lua")

-- project specific configuration settings

-- configuration { "cocoa_sim64_release" }

-- -------------------------------------------------------------
-- configuration { "cocoa_x64_debug" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_cocoa_x64_debug.lua")

-- project specific configuration settings

-- configuration { "cocoa_x64_debug" }

-- -------------------------------------------------------------
-- configuration { "cocoa_x64_release" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_cocoa_x64_release.lua")

-- project specific configuration settings

-- configuration { "cocoa_x64_release" }

-- -------------------------------------------------------------
end

if (_PLATFORM_IOS) then
-- -------------------------------------------------------------
-- configuration { "ios" } == _OS_IS_IOS
-- configuration { "ios*" }
-- -------------------------------------------------------------

-- common configuration settings
Expand Down Expand Up @@ -343,9 +435,9 @@ project "protobuf"
-- -------------------------------------------------------------
end

if (_OS_IS_ANDROID) then
if (_PLATFORM_ANDROID) then
-- -------------------------------------------------------------
-- configuration { "android" } == _OS_IS_ANDROID
-- configuration { "android*" }
-- -------------------------------------------------------------

-- common configuration settings
Expand Down Expand Up @@ -459,9 +551,9 @@ project "protobuf"
-- -------------------------------------------------------------
end

if (_TARGET_IS_WINUWP) then
if (_PLATFORM_WINUWP) then
-- -------------------------------------------------------------
-- configuration { "winuwp" } == _TARGET_IS_WINUWP
-- configuration { "windows" }
-- -------------------------------------------------------------

-- common configuration settings
Expand Down Expand Up @@ -524,30 +616,6 @@ project "protobuf"

-- configuration { "winuwp_release", "x64" }

-- -------------------------------------------------------------
-- configuration { "winuwp_debug", "ARM" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_winuwp_arm_debug.lua")

-- project specific configuration settings

-- configuration { "winuwp_debug", "ARM" }

-- -------------------------------------------------------------
-- configuration { "winuwp_release", "ARM" }
-- -------------------------------------------------------------

-- common configuration settings

dofile (_BUILD_DIR .. "/static_winuwp_arm_release.lua")

-- project specific configuration settings

-- configuration { "winuwp_release", "ARM" }

-- -------------------------------------------------------------
-- configuration { "winuwp_debug", "ARM64" }
-- -------------------------------------------------------------
Expand Down

0 comments on commit b40edf3

Please sign in to comment.