Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luarocks support. #123

Merged
merged 1 commit into from
Mar 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ cmake_minimum_required(VERSION 2.8)
project (luv)

include(deps/uv.cmake)
include(deps/luajit.cmake)

include_directories(deps/luajit/src)
if (LUV_LUA_INCDIR)
include_directories(${LUV_LUA_INCDIR})
link_directories(${LUV_LUA_LIBDIR})
else(LUV_LUA_INCDIR)
include(deps/luajit.cmake)
include_directories(deps/luajit/src)
endif(LUV_LUA_INCDIR)

add_library (luv MODULE src/luv.c)

Expand All @@ -31,3 +36,6 @@ else()
target_link_libraries(luv uv)
endif()

if (LUV_INSTALL_PREFIX)
install(TARGETS luv DESTINATION "${LUV_INSTALL_PREFIX}/lib")
endif(LUV_INSTALL_PREFIX)
33 changes: 33 additions & 0 deletions luv-1.4.2-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package = "luv"
version = "1.4.2-1"
source = {
url = 'git://github.com/luvit/luv',
tag = 'v1.4.2',
}

description = {
summary = "Bare libuv bindings for lua",
detailed = [[
libuv bindings for luajit and lua 5.1/5.2.

This library makes libuv available to lua scripts. It was made for the luvit project but should usable from nearly any lua project.
]],
homepage = "https://github.com/luvit/luv",
license = "Apache 2.0"
}

dependencies = {
"lua >= 5.1"
}

-- cmake -Bbuild -H. -DBUILD_SHARED_LIBS=ON
-- cmake --build build --target install --config Release
build = {
type = 'cmake',
variables = {
LUV_INSTALL_PREFIX = "$(PREFIX)",
LUV_LUA_LIBDIR = "$(LUA_LIBDIR)",
LUV_LUA_INCDIR = "$(LUA_INCDIR)",
BUILD_SHARED_LIBS="ON",
}
}