Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2008, 8:51:44 PM (17 years ago)
Author:
rgrieder
Message:
  • Changed working directory for tolua generator to library_output_path. That resolves windows issues with dlls.
  • Removed the need to create a second tolua application. There is only one now called toluaexe_orxonox.
  • 'w' (working directory) option of tolua extends to -L, pkg-file, -o and -H if of course -w is present
  • 's' option added to tolua: Tells which file contains the bindfile generator. In our case this is src/tolua/all.lua all.lua replaces tolua-5.1.pkg. We can still choose that file from CMake (TOLUA_PARSER_SOURCE)
  • Generator dependencies are declared in src/tolua/CMakeLists.txt and used in UseTolua.cmake (PARENT_SCOPE)
  • Fixed a bug when writing the header file inclusion in package.lua
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/src/tolua/lua/package.lua

    r2234 r2236  
    124124    output('#endif\n')
    125125    output('#include "string.h"\n\n')
    126     output('#include "tolua/tolua++.h"\n\n')
    127 
    128     if not flags.h then
    129         --  local temp = string.reverse(flags.H)
    130         --  local start1, end1 = string.find(temp, '/')
    131         --  local start2, end2 = string.find(temp, '\\')
    132         --  local res
    133         --  if not start1 == nil then
    134         --   if not start2 == nil then
    135         --    if start1 > start2 then
    136         --     res = string.sub(temp, 1, start2)
    137         --    else
    138         --     res = string.sub(temp, 1, start1)
    139         --    end
    140         --   else
    141         --    res = string.sub(temp, 1, start1)
    142         --   end
    143         --  elseif not start2 == nil then
    144         --   res = string.sub(temp, 1, start2)
    145         --  end
    146         --  res = string.reverse(res)
    147         output('#include "tolua_bind.h"')
    148         output('\n')
     126    output('#include "tolua++.h"\n\n')
     127
     128    if flags.H then
     129        local header = gsub(flags.H, '^.-([%w_]*%.[%w_]*)$', '%1')
     130        output('#include "'..header..'"\n')
    149131    end
    150132
     
    220202    output('*/\n\n')
    221203
    222     if not flags.h then
     204    if flags.H then
    223205        output('#include "'..self.name..'Prereqs.h"\n')
    224206        output('/* Exported function */')
    225         output('_'..self.name..'Export int  tolua_'..self.name..'_open (lua_State* tolua_S);')
     207        output('_'..self.name..'Export')
     208        output('int  tolua_'..self.name..'_open (lua_State* tolua_S);')
    226209        output('\n')
    227210    end
Note: See TracChangeset for help on using the changeset viewer.