Skip to content
Permalink
Browse files

More whitespace and formatting adjustments

These files differ more from the other ones yet they use mostly the same formatting.
  • Loading branch information...
sodevel committed Aug 30, 2019
1 parent ead2333 commit 9385d1f735eb5e122c1c34d1389e4d1d743026fd
Showing with 98 additions and 99 deletions.
  1. +29 −30 build/premake/solution.lua
  2. +69 −69 build/premake/wxformbuilder.lua
@@ -14,46 +14,46 @@ solution "wxFormBuilder-Solution"

local scriptDir = os.getcwd()

dofile( scriptDir .. "/wxwidgets.lua" )
dofile(scriptDir .. "/wxwidgets.lua")

local wxver = string.gsub( wxVersion, '%.', '' )
location ( "../../build/" .. wxVersion .. "/" .. _ACTION )
local wxver = string.gsub(wxVersion, '%.', '')
location ("../../build/" .. wxVersion .. "/" .. _ACTION)
BuildDir = solution().location
CustomPrefix = "wx_" .. wxTarget .. wxUnicodeSign
DebugSuffix = "-" .. wxver

os.chdir( BuildDir )
os.chdir(BuildDir)

--if wxCompiler == "gcc" and os.is("windows") then
-- flags {"NoImportLib"}
--end
--if wxCompiler == "gcc" and os.is("windows") then
-- flags {"NoImportLib"}
--end

if wxUseUnicode then
flags {"Unicode"}
defines {"UNICODE", "_UNICODE"}
end

if wxUseUnicode then
flags {"Unicode"}
defines {"UNICODE", "_UNICODE"}
end
configuration "windows"
defines {"WIN32", "_WINDOWS"}

configuration "macosx"
-- adding symbols so that premake does not include the "Wl,x"
-- flags, as these flags make clang linking fail
-- see http://industriousone.com/topic/how-remove-flags-ldflags
flags { "Symbols" }
buildoptions { "-Wno-overloaded-virtual" }
flags {"Symbols"}
buildoptions {"-Wno-overloaded-virtual"}

configuration "Debug"
defines {"DEBUG", "_DEBUG"}
flags {"Symbols"}

if wxCompiler == "gcc" then
buildoptions {"-O0"}
end
if wxCompiler == "gcc" then
buildoptions{"-O0"}
end

configuration "Release"
-- if wxCompiler == "gcc" then
-- linkoptions {"-s"}
-- end
--if wxCompiler == "gcc" then
-- linkoptions {"-s"}
--end
defines {"NDEBUG"}
flags {"Optimize", "ExtraWarnings"}

@@ -64,14 +64,13 @@ end
-- This produces D9025 because without ExtraWarnings /W3 gets set
--buildoptions {"/W4"}

dofile( scriptDir .. "/ticpp.lua" )
dofile( scriptDir .. "/plugin-interface.lua" )

dofile( scriptDir .. "/plugins/additional.lua" )
dofile( scriptDir .. "/plugins/common.lua" )
dofile( scriptDir .. "/plugins/containers.lua" )
dofile( scriptDir .. "/plugins/forms.lua" )
dofile( scriptDir .. "/plugins/layout.lua" )
dofile( scriptDir .. "/wxformbuilder.lua" )
dofile( scriptDir .. "/utilities.lua" )
dofile(scriptDir .. "/ticpp.lua")
dofile(scriptDir .. "/plugin-interface.lua")

dofile(scriptDir .. "/plugins/additional.lua")
dofile(scriptDir .. "/plugins/common.lua")
dofile(scriptDir .. "/plugins/containers.lua")
dofile(scriptDir .. "/plugins/forms.lua")
dofile(scriptDir .. "/plugins/layout.lua")
dofile(scriptDir .. "/wxformbuilder.lua")
dofile(scriptDir .. "/utilities.lua")
@@ -8,107 +8,107 @@
-- Licence: GNU General Public License Version 2
-----------------------------------------------------------------------------
project "wxFormBuilder"
kind "WindowedApp"
kind "WindowedApp"
files
{
"../../src/**.h", "../../src/**.hpp", "../../src/**.hh",
"../../src/**.cpp", "../../src/**.cc", "../../src/**.fbp"
}
excludes
{
"../../src/controls/**",
"../../src/rad/designer/resizablepanel.*"
}
{
"../../src/controls/**",
"../../src/rad/designer/resizablepanel.*"
}
includedirs
{
"../../src",
"../../subprojects/ticpp", "../../sdk/plugin_interface"
}
defines {"NO_GCC_PRAGMA", "TIXML_USE_TICPP", "APPEND_WXVERSION"}
libdirs {"../../sdk/lib"}
links {"TiCPP", "plugin-interface"}
defines {"NO_GCC_PRAGMA", "TIXML_USE_TICPP", "APPEND_WXVERSION"}
libdirs {"../../sdk/lib"}
links {"TiCPP", "plugin-interface"}

local libs = ""
if wxUseMediaCtrl then
libs = "std,stc,richtext,propgrid,aui,ribbon,media"
else
libs = "std,stc,richtext,propgrid,aui,ribbon"
end

if wxArchitecture then
buildoptions {"-arch " .. wxArchitecture}
end

if os.is( "linux" ) then
newoption
{
trigger = "rpath",
description = "Linux only, set rpath on the linker line to find shared libraries next to executable"
}

-- Set rpath
local useRpath = true
local rpath= _ACTION == "codeblocks" and "$" or "$$"
rpath = rpath .. "``ORIGIN/../lib/wxformbuilder"
local rpathOption = _OPTIONS[ "rpath" ]

if rpathOption then
if "no" == rpathOption or "" == rpathOption then
useRpath = false
else
rpath = rpathOption
end
end

if useRpath then
print( "rpath: -Wl,-rpath," .. rpath )
linkoptions( "-Wl,-rpath," .. rpath )
end
end
if wxUseMediaCtrl then
libs = "std,stc,richtext,propgrid,aui,ribbon,media"
else
libs = "std,stc,richtext,propgrid,aui,ribbon"
end

if wxArchitecture then
buildoptions {"-arch " .. wxArchitecture}
end

if os.is("linux") then
newoption
{
trigger = "rpath",
description = "Linux only, set rpath on the linker line to find shared libraries next to executable"
}

-- Set rpath
local useRpath = true
local rpath= _ACTION == "codeblocks" and "$" or "$$"
rpath = rpath .. "``ORIGIN/../lib/wxformbuilder"
local rpathOption = _OPTIONS["rpath"]

if rpathOption then
if "no" == rpathOption or "" == rpathOption then
useRpath = false
else
rpath = rpathOption
end
end

if useRpath then
print("rpath: -Wl,-rpath," .. rpath)
linkoptions("-Wl,-rpath," .. rpath)
end
end

configuration "not vs*"
buildoptions "-std=c++17"
buildoptions "-std=c++17"

configuration "vs*"
defines {"_CRT_SECURE_NO_DEPRECATE", "_CRT_SECURE_NO_WARNINGS"}
buildoptions {"/std:c++17", "/wd4003"}

configuration "macosx"
linkoptions {"-Wl,-L../../../output/lib/wxformbuilder"}
linkoptions {"-Wl,-L../../../output/lib/wxformbuilder"}

configuration {"macosx", "Debug"}
postbuildcommands {"sh ../../../install/macosx/postbuild.sh -c debug" }
postbuildcommands{"sh ../../../install/macosx/postbuild.sh -c debug"}

configuration {"macosx", "Release"}
postbuildcommands {"sh ../../../install/macosx/postbuild.sh -c release" }
postbuildcommands{"sh ../../../install/macosx/postbuild.sh -c release"}

configuration "not windows"
excludes {"../../src/*.rc"}
libdirs {"../../output/lib/wxformbuilder"}
targetdir "../../output/bin"
targetname "wxformbuilder"
links {"dl"}
excludes {"../../src/*.rc"}
libdirs {"../../output/lib/wxformbuilder"}
targetdir "../../output/bin"
targetname "wxformbuilder"
links {"dl"}

configuration "windows"
files {"../../src/*.rc"}
libdirs {"../../output"}
targetdir "../../output"
flags {"Symbols", "WinMain"}

if wxCompiler == "gcc" then
buildoptions {"-gstabs"}
links {"bfd", "iberty", "psapi", "imagehlp"}
if not ( wxCompilerName == "mingw64" ) then
links {"intl"}
end
end
files {"../../src/*.rc"}
libdirs {"../../output"}
targetdir "../../output"
flags {"Symbols", "WinMain"}
if wxCompiler == "gcc" then
buildoptions{"-gstabs"}
links {"bfd", "iberty", "psapi", "imagehlp"}
if not (wxCompilerName == "mingw64") then
links {"intl"}
end
end

configuration "Debug"
defines {"__WXFB_DEBUG__"}
targetsuffix ( DebugSuffix )
wx_config { Libs=libs, Debug="yes" }
defines {"__WXFB_DEBUG__"}
targetsuffix (DebugSuffix)
wx_config {Libs=libs, Debug="yes"}

configuration "Release"
wx_config { Libs=libs }
wx_config {Libs=libs}

configuration {"not vs*", "Release"}
buildoptions {"-fno-strict-aliasing"}

0 comments on commit 9385d1f

Please sign in to comment.
You can’t perform that action at this time.