Skip to content

Instantly share code, notes, and snippets.

@tycho
Last active March 22, 2018 23:19
Show Gist options
  • Save tycho/b3d1ba84b07b98683f64c8a34f50d2b0 to your computer and use it in GitHub Desktop.
Save tycho/b3d1ba84b07b98683f64c8a34f50d2b0 to your computer and use it in GitHub Desktop.
WIP: ConEmu ARM64 target premake5.lua
diff --git a/premake5.lua b/premake5.lua
index a47c6ac35..bfee57b34 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -1,6 +1,6 @@
workspace "CE"
configurations { "Release", "Debug", "Remote" }
- platforms { "Win32", "x64" }
+ platforms { "Win32", "x64", "ARM64" }
-- Where *.vcxproj files would be placed
location "src"
--basedir "%{cfg.location}"
@@ -21,8 +21,14 @@ workspace "CE"
architecture "x64"
defines { "WIN64", "_WIN64" }
+ filter "platforms:ARM64"
+ architecture "ARM64"
+ defines { "WIN64", "_WIN64" }
+
filter "action:vs2017"
toolset "v141_xp"
+ filter {"platforms:ARM64", "action:vs2017"}
+ toolset "v141"
filter "action:vs2015"
toolset "v140_xp"
filter "action:vs2013"
@@ -73,18 +79,27 @@ function postbuild_module(dllname)
filter { "configurations:Release", "platforms:x64" }
postbuild_module_(dllname, "Release", "t64")
+ filter { "configurations:Release", "platforms:ARM64" }
+ postbuild_module_(dllname, "Release", "tarm64")
+
filter { "configurations:Debug", "platforms:Win32" }
postbuild_module_(dllname, "Debug", "t32")
filter { "configurations:Debug", "platforms:x64" }
postbuild_module_(dllname, "Debug", "t64")
+ filter { "configurations:Debug", "platforms:ARM64" }
+ postbuild_module_(dllname, "Debug", "tarm64")
+
filter { "configurations:Remote", "platforms:Win32" }
postbuild_module_(dllname, "Z:/", "t32")
filter { "configurations:Remote", "platforms:x64" }
postbuild_module_(dllname, "Z:/", "t64")
+ filter { "configurations:Remote", "platforms:ARM64" }
+ postbuild_module_(dllname, "Z:/", "tarm64")
+
filter {}
end
@@ -159,6 +174,8 @@ project "common-kernel"
targetsuffix "32"
filter "platforms:x64"
targetsuffix "64"
+ filter "platforms:ARM64"
+ targetsuffix "Arm64"
filter {}
-- end of "common-kernel"
@@ -192,6 +209,8 @@ project "common-user"
targetsuffix "32"
filter "platforms:x64"
targetsuffix "64"
+ filter "platforms:ARM64"
+ targetsuffix "Arm64"
filter {}
-- end of "common-user"
@@ -214,8 +233,13 @@ project "ConEmu"
"shlwapi",
"version",
"gdiplus",
+ "gdi32",
"winmm",
"netapi32",
+ "shell32",
+ "comdlg32",
+ "advapi32",
+ "ole32",
}
-- we can't use pch because SHOWDEBUGSTR is defined or not per source file
@@ -269,6 +293,8 @@ project "ConEmu"
implibdir ("%{cfg.objdir}")
filter "platforms:x64"
targetsuffix "64"
+ filter "platforms:ARM64"
+ targetsuffix "Arm64"
filter {}
-- end of "ConEmu"
@@ -285,6 +311,7 @@ project "ConEmuC"
links {
"common-kernel",
+ "shell32.lib",
}
dependson {
@@ -314,6 +341,8 @@ project "ConEmuC"
targetsuffix ""
filter "platforms:x64"
targetsuffix "64"
+ filter "platforms:ARM64"
+ targetsuffix "Arm64"
filter {}
-- end of "ConEmuC"
@@ -374,6 +403,8 @@ project "ConEmuCD"
targetsuffix ""
filter "platforms:x64"
targetsuffix "64"
+ filter "platforms:ARM64"
+ targetsuffix "Arm64"
filter {}
-- end of "ConEmuCD"
@@ -457,6 +488,8 @@ project "ConEmuHk"
targetsuffix ""
filter "platforms:x64"
targetsuffix "64"
+ filter "platforms:ARM64"
+ targetsuffix "Arm64"
filter {}
-- end of "ConEmuHk"
@@ -475,6 +508,8 @@ project "Far.ConEmuPlugin"
"common-kernel",
"common-user",
"version",
+ "gdi32",
+ "shell32",
}
files {
@@ -505,6 +540,8 @@ project "Far.ConEmuPlugin"
targetsuffix ""
filter "platforms:x64"
targetsuffix ".x64"
+ filter "platforms:ARM64"
+ targetsuffix ".arm64"
filter {}
-- end of "Far.ConEmuPlugin"
@@ -523,6 +560,9 @@ project "Far.ConEmuBg"
"common-kernel",
"common-user",
"version",
+ "gdi32",
+ "ole32",
+ "shell32",
}
files {
@@ -553,6 +593,8 @@ project "Far.ConEmuBg"
targetsuffix ""
filter "platforms:x64"
targetsuffix ".x64"
+ filter "platforms:ARM64"
+ targetsuffix ".arm64"
filter {}
-- end of "Far.ConEmuBg"
@@ -571,6 +613,7 @@ project "Far.ConEmuLn"
"common-kernel",
"common-user",
"version",
+ "gdi32",
}
files {
@@ -601,6 +644,8 @@ project "Far.ConEmuLn"
targetsuffix ""
filter "platforms:x64"
targetsuffix ".x64"
+ filter "platforms:ARM64"
+ targetsuffix ".arm64"
filter {}
-- end of "Far.ConEmuLn"
@@ -619,6 +664,9 @@ project "Far.ConEmuTh"
"common-kernel",
"common-user",
"version",
+ "shell32",
+ "gdi32",
+ "ole32",
}
files {
@@ -649,6 +697,8 @@ project "Far.ConEmuTh"
targetsuffix ""
filter "platforms:x64"
targetsuffix ".x64"
+ filter "platforms:ARM64"
+ targetsuffix ".arm64"
filter {}
-- end of "Far.ConEmuTh"
@@ -664,6 +714,8 @@ project "Far.ConEmuTh.gdi+"
links {
"common-kernel",
+ "gdi32",
+ "ole32",
}
files {
@@ -702,6 +754,7 @@ project "Far.ConEmuTh.ico"
links {
"common-kernel",
+ "ole32",
}
files {
@@ -781,6 +834,7 @@ project "Far.ExtendedConsole"
links {
"common-kernel",
+ "gdi32",
}
files {
@@ -815,5 +869,7 @@ project "Far.ExtendedConsole"
targetsuffix ""
filter "platforms:x64"
targetsuffix "64"
+ filter "platforms:ARM64"
+ targetsuffix "Arm64"
filter {}
-- end of "Far.ExtendedConsole"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment