Skip to content

Commit

Permalink
Support building for x86_64 with plain Mingw-w64 and MSVC toolchains …
Browse files Browse the repository at this point in the history
…on Windows

This only works with Premake 5 and requires the directory layout of official
wxWidgets releases.
  • Loading branch information
sodevel committed Apr 1, 2020
1 parent d5e5caf commit 50730f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions build/premake/solution.lua
Expand Up @@ -17,7 +17,19 @@ solution "wxFormBuilder-Solution"

local scriptDir = os.getcwd()

-- The wxWidgets Configuration-Script parses the corresponding command line flags
-- for the architecture, its configuration function works only for one architecture
-- hence only one platform can be specified.
-- Don't specify the platform if none is specified to prevent the creation
-- of tagged configuration names.
dofile(scriptDir .. "/wxwidgets.lua")
if platforms then
if (wxArchitecture == "x86_64") then
platforms {"Win64"}
elseif (wxArchitecture == "x86") then
platforms {"Win32"}
end
end

local wxver = string.gsub(wxVersion, '%.', '')
location ("../../build/" .. wxVersion .. "/" .. _ACTION)
Expand Down
3 changes: 2 additions & 1 deletion build/premake/wxwidgets.lua
Expand Up @@ -188,7 +188,8 @@ function wx_config_Private(wxRoot, wxDebug, wxHost, wxVersion, wxStatic, wxUnico
end

local wxLibPath = path.join(wxRoot, "lib")
wxLibPath = path.join(wxLibPath, wxCompiler .. wxCompilerVersion .. "_" .. iif(wxStatic == 'yes', 'lib', 'dll'))
-- This requires the directory layout of official wxWidgets releases
wxLibPath = path.join(wxLibPath, wxCompiler .. wxCompilerVersion .. iif(wxArchitecture == "x86_64", "_x64", "") .. "_" .. iif(wxStatic == 'yes', 'lib', 'dll'))
-- common defines
defines{ "__WXMSW__" }

Expand Down

0 comments on commit 50730f8

Please sign in to comment.