Add CMake build support for Lua bindings.

This commit is contained in:
Brenden Matthews
2009-12-17 19:46:26 -08:00
parent 32c5f451b9
commit fb33419cd4
7 changed files with 97 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
include(ToLua)
if(BUILD_LUA_CAIRO)
include_directories(${luacairo_includes} ${CMAKE_CURRENT_SOURCE_DIR})
wrap_tolua(luacairo_src cairo.pkg)
add_library(cairo SHARED ${luacairo_src})
target_link_libraries(cairo ${luacairo_libs} ${TOLUA_LIBS})
set(lua_libs ${lua_libs} cairo)
endif(BUILD_LUA_CAIRO)
if(BUILD_LUA_IMLIB2)
include_directories(${luaimlib2_includes} ${CMAKE_CURRENT_SOURCE_DIR})
wrap_tolua(luaimlib2_src imlib2.pkg)
add_library(imlib2 SHARED ${luaimlib2_src})
target_link_libraries(imlib2 ${luaimlib2_libs} ${TOLUA_LIBS})
set(lua_libs ${lua_libs} imlib2)
endif(BUILD_LUA_IMLIB2)
install(TARGETS
${lua_libs}
LIBRARY DESTINATION lib/conky
ARCHIVE DESTINATION lib/conky
)

View File

@@ -3,7 +3,7 @@ $#include <cairo-deprecated.h>
$#include <cairo.h>
$#include <cairo-xlib.h>
$#include <X11/Xlib.h>
$#include "libcairo-helper.h"
$#include <libcairo-helper.h>
/*
* This code was mostly copied from cairo.h and cairo-xlib.h with comments
* removed. The licence noticed below is present for the sake of clarity.