Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/sys.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2012-11-23 03:59:15 +0400
committerClement Farabet <clement.farabet@gmail.com>2012-11-23 03:59:15 +0400
commit875927f11445c80927f14b14676fcff7c84dba9a (patch)
tree624644af4b5323f57245d32da926834d466b2b34
parente89bc1873aaa85f0c60d1fce65d63d374b0e2b46 (diff)
Rockspec for luarocks support
-rw-r--r--CMakeLists.txt5
-rw-r--r--sys-1.0-0.rockspec26
2 files changed, 31 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e17c53..532ca43 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,10 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
CMAKE_POLICY(VERSION 2.6)
+IF(LUAROCKS_PREFIX)
+ MESSAGE(STATUS "Installing Torch through Luarocks")
+ STRING(REGEX REPLACE "(.*)lib/luarocks/rocks.*" "\\1" CMAKE_INSTALL_PREFIX "${LUAROCKS_PREFIX}")
+ MESSAGE(STATUS "Prefix inferred from Luarocks: ${CMAKE_INSTALL_PREFIX}")
+ENDIF()
FIND_PACKAGE(Torch REQUIRED)
SET(src sys.c)
diff --git a/sys-1.0-0.rockspec b/sys-1.0-0.rockspec
new file mode 100644
index 0000000..d6224ba
--- /dev/null
+++ b/sys-1.0-0.rockspec
@@ -0,0 +1,26 @@
+package = "sys"
+version = "1.0-0"
+
+source = {
+ url = "https://github.com/clementfarabet/lua---sys"
+}
+
+description = {
+ summary = "A system library for Torch",
+ detailed = [[
+Provides system functionalities for Torch.
+ ]],
+ homepage = "https://github.com/clementfarabet/lua---sys",
+ license = "BSD"
+}
+
+dependencies = {
+ "torch >= 7.0",
+}
+
+build = {
+ type = "cmake",
+ variables = {
+ LUAROCKS_PREFIX = "$(PREFIX)"
+ }
+}