Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2008, 10:13:11 PM (16 years ago)
Author:
rgrieder
Message:

Resolved tolua include directory problem in another fashion by adding CMAKE_BINARY_DIR/src to the include directories and adjusting the the include directives. There were some changes necessary in package.lua (it uses the package name as folder to write "#include "core/CommandExecutor.h"").

The problem with the old resolution (-iquotes) was that you could write "#include "Core.h"" in a file that is not in the core, because src/core was effectively added to the list of include directories (just the ones with quotes of course).

File:
1 edited

Legend:

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

    r2236 r2239  
    128128    if flags.H then
    129129        local header = gsub(flags.H, '^.-([%w_]*%.[%w_]*)$', '%1')
    130         output('#include "'..header..'"\n')
     130        local package_lower = string.lower(self.name)
     131        output('#include "'..package_lower..'/'..header..'"\n')
    131132    end
    132133
     
    203204
    204205    if flags.H then
    205         output('#include "'..self.name..'Prereqs.h"\n')
     206        local package_lower = string.lower(self.name)
     207        output('#include "'..package_lower..'/'..self.name..'Prereqs.h"\n')
    206208        output('/* Exported function */')
    207209        output('_'..self.name..'Export')
     
    220222-- *** Thanks to Ariel Manzur for fixing bugs in nested directives ***
    221223function extract_code(fn,s)
    222     local code = '\n$#include "'..fn..'"\n'
     224    local code = '\n$#include "'..string.lower(flags.n)..'/'..fn..'"\n'
    223225    s= "\n" .. s .. "\n" -- add blank lines as sentinels
    224226
Note: See TracChangeset for help on using the changeset viewer.