Commits

Igor Baidiuk  committed f0b6900

At least compiles and links. No import lib generated, no exports

  • Participants
  • Parent commits 8609216

Comments (0)

Files changed (1)

 top = '.'
 out = 'build'
 
-def options(ctx):
-	ctx.load('compiler_cxx boost')
+def options(c):
+	c.load('compiler_cxx boost')
+	c.add_option('--lualib-root', type='string', default='', dest='lua_root', help='Path to Lua SDK')
 
-def configure(ctx):
-	ctx.load('compiler_cxx boost')
+def configure(c):
+	c.load('compiler_cxx boost')
 	# MS C++ doesn't enable exceptions by default, so we'll need to
-	if ctx.env['COMPILER_CXX'] == 'msvc':
-		ctx.env.CXXFLAGS += ['/EHsc']
+	if c.env['COMPILER_CXX'] == 'msvc':
+		c.env.CXXFLAGS += ['/EHsc']
 	
-	ctx.env.DEFINES_BOOST += ['BOOST_ALL_NO_LIB']
-	ctx.check_boost(lib='system thread date_time chrono')
+	c.env.DEFINES_BOOST += ['BOOST_ALL_NO_LIB']
+	c.check_boost(lib='system thread date_time chrono')
+	
+	if c.options.lua_root == '':
+		c.fatal('You must specify Lua SDK location with --lualib-root command line argument')
+	
+	lua_root = c.options.lua_root
+	c.env.INCLUDES_LUALIB   = ['%s/include'%lua_root]
+	c.env.LIB_LUALIB        = ['lua51']
+	c.env.LIBPATH_LUALIB    = ['%s/lib'%lua_root]
 
-def build(ctx):
-	ctx.shlib(
-		source='src/channels.cpp src/libmain.cpp src/utility.cpp',
-		target='channels',
-		use='BOOST'
+def build(c):
+	c.shlib(
+		source = 'src/channels.cpp src/libmain.cpp src/utility.cpp',
+		target = 'channels',
+		use    = 'BOOST LUALIB'
 	)