Skip to content

Commit

Permalink
Use the right target for Lua bindings on Windows
Browse files Browse the repository at this point in the history
 * Works by copying the target's output file to the binding's base
   directory.
 * Doesn't look like Code::Blocks 10.05 can set custom clean steps, so
   these copied files can't be cleaned, only overwritten. Bugger.
  • Loading branch information
tung committed Feb 7, 2011
1 parent 9e5a1c8 commit 368a558
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/gl.lua
@@ -1,7 +1,6 @@
local path
if WIN32 then
-- TODO: Support Release target too.
path = "lib/gl/luagl/bin/Debug/luagl.dll"
path = "lib/gl/luagl/LuaGL.dll"
else
-- Assume Linux for now.
path = "lib/gl/luagl/libluagl.so"
Expand Down
2 changes: 2 additions & 0 deletions lib/gl/luagl/.gitignore
@@ -1,2 +1,4 @@
bin/Debug/*.dll
bin/Release/*.dll
LuaGL.dll
LuaGLU.dll
4 changes: 4 additions & 0 deletions lib/gl/luagl/LuaGL.cbp
Expand Up @@ -42,6 +42,10 @@
<Add library="..\..\..\contrib\lua\lua5.1.lib" />
<Add directory="..\..\..\contrib\lua" />
</Linker>
<ExtraCommands>
<Add after='cmd /c copy &quot;${TARGET_OUTPUT_FILE}&quot; .' />
<Mode after="always" />
</ExtraCommands>
<Unit filename="..\..\gl.lua">
<Option target="&lt;{~None~}&gt;" />
</Unit>
Expand Down
4 changes: 4 additions & 0 deletions lib/gl/luagl/LuaGLU.cbp
Expand Up @@ -43,6 +43,10 @@
<Add library="..\..\..\contrib\lua\lua5.1.lib" />
<Add directory="..\..\..\contrib\lua" />
</Linker>
<ExtraCommands>
<Add after='cmd /c copy &quot;${TARGET_OUTPUT_FILE}&quot; .' />
<Mode after="always" />
</ExtraCommands>
<Unit filename="luagl_const.c">
<Option compilerVar="CC" />
</Unit>
Expand Down
3 changes: 1 addition & 2 deletions lib/glu.lua
@@ -1,7 +1,6 @@
local path
if WIN32 then
-- TODO: Support Release target too.
path = "lib/gl/luagl/bin/Debug/luaglu.dll"
path = "lib/gl/luagl/LuaGLU.dll"
else
-- Assume Linux for now.
path = "lib/gl/luagl/libluaglu.so"
Expand Down
3 changes: 1 addition & 2 deletions lib/sdl.lua
@@ -1,7 +1,6 @@
local path
if WIN32 then
-- TODO: Support Release target too.
path = "lib/sdl/LuaSDL_new/bin/Debug/LuaSDL.dll"
path = "lib/sdl/LuaSDL_new/LuaSDL.dll"
else
-- Assume Linux for now.
path = "lib/sdl/LuaSDL_new/libluasdl.so"
Expand Down
1 change: 1 addition & 0 deletions lib/sdl/LuaSDL_new/.gitignore
Expand Up @@ -4,3 +4,4 @@ bin/Debug/*.dll
bin/Release/*.dll
pkg/SDL_config.h.pkg
pkg/SDL_platform.h.pkg
LuaSDL.dll
4 changes: 4 additions & 0 deletions lib/sdl/LuaSDL_new/LuaSDL.cbp
Expand Up @@ -53,6 +53,10 @@
<Add directory="..\..\..\contrib\lua" />
<Add directory="..\..\..\contrib\sdl\lib" />
</Linker>
<ExtraCommands>
<Add after='cmd /c copy &quot;${TARGET_OUTPUT_FILE}&quot; .' />
<Mode after="always" />
</ExtraCommands>
<Unit filename="..\..\sdl.lua">
<Option target="&lt;{~None~}&gt;" />
</Unit>
Expand Down
3 changes: 1 addition & 2 deletions lib/sdlgl.lua
@@ -1,7 +1,6 @@
local path
if WIN32 then
-- TODO: Support Release target too.
path = "lib/sdlgl/bin/Debug/sdlgl.dll"
path = "lib/sdlgl/sdlgl.dll"
else
-- Assume Linux for now.
path = "lib/sdlgl/libsdlgl.so"
Expand Down
1 change: 1 addition & 0 deletions lib/sdlgl/.gitignore
@@ -1,2 +1,3 @@
/obj
/bin
sdlgl.dll
4 changes: 4 additions & 0 deletions lib/sdlgl/sdlgl.cbp
Expand Up @@ -45,6 +45,10 @@
<Add directory="..\..\contrib\lua" />
<Add directory="..\..\contrib\sdl\lib" />
</Linker>
<ExtraCommands>
<Add after='cmd /c copy &quot;${TARGET_OUTPUT_FILE}&quot; .' />
<Mode after="always" />
</ExtraCommands>
<Unit filename="..\sdlgl.lua">
<Option target="&lt;{~None~}&gt;" />
</Unit>
Expand Down

0 comments on commit 368a558

Please sign in to comment.