1-----------------------------------------------------------------------------
2--  Name:        solution.lua
3--  Purpose:     Generic Premake 4 solution defining common configurations
4--               for all projects it contains.
5--  Author:      Andrea Zanellato
6--  Modified by:
7--  Created:     19/10/2011
8--  Copyright:   (c) 2011 wxFormBuilder Team
9--  Licence:     GNU General Public License Version 2
10-----------------------------------------------------------------------------
11solution "wxFormBuilder-Solution"
12    language "C++"
13    configurations      {"Debug", "Release"}
14
15    local scriptDir     = os.getcwd()
16
17    dofile( scriptDir .. "/wxwidgets.lua" )
18
19    local wxver         = string.gsub( wxVersion, '%.', '' )
20    location            ( "../../build/" .. wxVersion .. "/" .. _ACTION )
21    BuildDir            = solution().location
22	CustomPrefix        = "wx_" .. wxTarget .. wxUnicodeSign
23
24if wxVersion < "2.9" then
25    DebugSuffix         = "d-" .. wxver
26else
27    DebugSuffix         = "-" .. wxver
28end
29    os.chdir( BuildDir )
30
31--if wxCompiler == "gcc" and os.is("windows") then
32--  flags               {"NoImportLib"}
33--end
34
35if wxUseUnicode then
36    flags               {"Unicode"}
37    defines             {"UNICODE", "_UNICODE"}
38end
39    configuration "windows"
40        defines         {"WIN32", "_WINDOWS"}
41
42    configuration "Debug"
43        defines         {"DEBUG", "_DEBUG"}
44        flags           {"Symbols"}
45
46		if wxCompiler == "gcc" then
47			buildoptions    {"-O0"}
48		end
49
50    configuration "Release"
51		-- if wxCompiler == "gcc" then
52		-- 	 linkoptions {"-s"}
53		-- end
54        defines         {"NDEBUG"}
55        -- flags           {"OptimizeSpeed"}
56
57    dofile( scriptDir .. "/ticpp.lua" )
58    dofile( scriptDir .. "/plugin-interface.lua" )
59
60if wxVersion < "2.9" then
61	dofile( scriptDir .. "/wxflatnotebook.lua" )
62    dofile( scriptDir .. "/wxpropgrid.lua" )
63    dofile( scriptDir .. "/wxscintilla.lua" )
64	dofile( scriptDir .. "/plugins/wxadditions-mini.lua" )
65end
66    dofile( scriptDir .. "/plugins/additional.lua" )
67    dofile( scriptDir .. "/plugins/common.lua" )
68    dofile( scriptDir .. "/plugins/containers.lua" )
69    dofile( scriptDir .. "/plugins/forms.lua" )
70    dofile( scriptDir .. "/plugins/layout.lua" )
71    dofile( scriptDir .. "/wxformbuilder.lua" )
72    dofile( scriptDir .. "/utilities.lua" )
73
74