Menu

[r35]: / trunk / bindings / lua / sublua4.lua  Maximize  Restore  History

Download this file

109 lines (93 with data), 3.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
-- OPTIONS -------------------------------------------------------------------
--
newoption
{
trigger = "sublua-shared",
description = "Create a dynamically loadable version (dll/so) of SubLua."
}
newoption
{
trigger = "force-debug-symbols",
description = "Forces the debug symbols to be included. Can be used to debug against the release version of lua.exe."
}
newoption
{
trigger = "disable-svn-version-generation",
description = "Turn off prebuild SVN verion generation commands."
}
if os.is( "windows" ) then
--newoption{ trigger = "crtfix", description = "Uses ResourceHacker to update the manifest to fix the multiple VC CRT manifest versions." }
--newoption{ trigger = "install", description = "Installs the compiled dynamicly loadable version into $(LUA_DEV)/clibs.." }
end
-- PROJECT CONFIGURATION -------------------------------------------------------
--
project "SubLua"
if _OPTIONS["sublua-shared"] then
kind "SharedLib"
--defines "SUBLUA_MAKING_DLL"
else
kind "StaticLib"
end
targetprefix "" -- Make sure that the 'lib' prefix is removed for Lua modules.
targetsuffix "" -- Make sure that the 'lib' prefix is removed for Lua modules.
-- PROJECT FILES ---------------------------------------------------------------
--
files { "**.cpp", "**.h", "**.hpp", "**.lua" }
local oldprebuildcommands = prebuildcommands
if _OPTIONS["disable-svn-version-generation"] then
function prebuildcommands( ... ) end
end
MakeVersion( project().name .. "Version.cpp" )
if os.is( "windows" ) then
MakeVersion( project().name..".rc" )
--MakeVersion( "installer/windows/"..package.name..".iss" )
end
if _OPTIONS["disable-svn-version-generation"] then
-- Restore original functionality
prebuildcommands = oldprebuildcommands
end
excludes { "**.template", "tests/support/**.hpp" }
includedirs { "luaxx" }
-- LINKER SETTINGS ------------------------------------------------------------
--
links { "SubCpp" }
-- COMPILER SPECIFIC SETUP ----------------------------------------------------
--
if ActionUsesMSVC() then
linkoptions { "/DEF:sublua.def" }
end
-- OPERATING SYSTEM SPECIFIC SETTINGS -----------------------------------------
--
if os.is( "windows" ) then
if ActionUsesGCC() then
linkoptions { "sublua.def" }
end
elseif os.is( "linux" ) then -- LINUX
else -- MACOSX
end
-- PACKAGE SETUP --------------------------------------------------------------
--
Configure()
if _OPTIONS["force-debug-symbols"] then
config["Release"].buildflags = { "optimize-size" }
config["Release"].buildoptions = { "/Od" }
end
svn.Configure()
lua.Configure()
-- POST-BUILD SETUP -----------------------------------------------------------
--
--[[if windows then
local pathSeparator = "/"
if ActionUsesMSVC() then
pathSeparator = "\\"
end
if _OPTIONS["crtfix"] then
local debugBinary = project().bindir .. pathSeparator .. project().config["Debug"].targetname .. ".dll"
local releaseBinary = project().bindir .. pathSeparator .. project().targetname .. ".dll"
local debugCommand = "support" .. pathSeparator .. "ResHacker.exe -modify " .. debugBinary .. ", " .. debugBinary .. ", support" .. pathSeparator .. "crtfixd.res, 24,2,"
local releaseCommand = "support" .. pathSeparator .. "ResHacker.exe -modify " .. releaseBinary .. ", " .. releaseBinary .. ", support" .. pathSeparator .. "crtfix.res, 24,2,"
--print( releaseCommand, debugCommand )
table.insert( config["Debug"].postbuildcommands(), 1, debugCommand )
config["Release"].postbuildcommands { releaseCommand }
end
end]]
MongoDB Logo MongoDB