This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
forked from luarocks/luarocks
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Works! Tested on Linux and OSX. Even searches in lib for dependencies
- Loading branch information
Showing
5 changed files
with
551 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright (C) 2011 LuaDist. | ||
# Created by Peter Drahoš | ||
# Redistribution and use of this file is allowed according to the terms of the MIT license. | ||
# For details see the COPYRIGHT file distributed with LuaDist. | ||
# Please note that the package source code is licensed under its own license. | ||
|
||
project ( luarocks NONE ) | ||
cmake_minimum_required ( VERSION 2.6 ) | ||
include ( dist.cmake ) | ||
|
||
## settings | ||
set ( LUA_INCDIR ${INSTALL_INC} ) | ||
set ( LUA_LIBDIR ${INSTALL_LIB} ) | ||
set ( LUA_BINDIR ${INSTALL_BIN} ) | ||
set ( LUA_INTERPRETER lua ) | ||
set ( LUA_SUFFIX "51" ) | ||
|
||
set ( LUAROCKS_SYSCONFIG ${INSTALL_ETC} ) | ||
set ( LUAROCKS_ROCKS_TREE ${INSTALL_DATA}/rocks ) | ||
|
||
# System detection | ||
set ( LUAROCKS_UNAME_S Unix CACHE STRING "Detected system.") | ||
if ( CYGWIN ) | ||
set ( LUAROCKS_UNAME_S CYGWIN ) | ||
elseif ( MINGW ) | ||
set ( LUAROCKS_UNAME_S MINGW ) | ||
elseif ( WIN32 ) | ||
set ( LUAROCKS_UNAME_S Windows ) | ||
elseif ( LINUX ) | ||
set ( LUAROCKS_UNAME_S Linux ) | ||
elseif ( APPLE ) | ||
set ( LUAROCKS_UNAME_S Darwin ) | ||
endif () | ||
|
||
# Architecture detection | ||
set ( LUAROCKS_UNAME_M x86 CACHE STRING "Detected architecture." ) | ||
if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) | ||
set ( LUAROCKS_UNAME_M x86_64 ) | ||
endif () | ||
|
||
set ( LUAROCKS_DOWNLOADER curl ) | ||
set ( LUAROCKS_MD5CHECKER md5sum ) | ||
set ( LUAROCKS_FORCE_CONFIG true ) | ||
configure_file ( config.in ${CMAKE_CURRENT_BINARY_DIR}/config.lua @ONLY ) | ||
|
||
install ( DIRECTORY src/luarocks DESTINATION ${INSTALL_LMOD} ) | ||
install_lua_module ( luarocks.config ${CMAKE_CURRENT_BINARY_DIR}/config.lua ) | ||
install_lua_executable ( luarocks src/bin/luarocks ) | ||
install_lua_executable ( luarocks-admin src/bin/luarocks-admin ) | ||
|
||
install_data ( COPYING README.md ) | ||
install_data ( COPYING INTO rocks ) | ||
install_test ( test/ ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- This file was automatically generated by LuaDist | ||
local root = [[@CMAKE_INSTALL_PREFIX@/]] | ||
|
||
-- LuaDist specific "relarive" root | ||
if _PROGDIR then | ||
root = _PROGDIR .. "/../" | ||
end | ||
|
||
module("luarocks.config") | ||
|
||
-- Lua | ||
LUA_DIR=root | ||
LUA_INCDIR=LUA_DIR .. [[@LUA_INCDIR@]] | ||
LUA_LIBDIR=LUA_DIR .. [[@LUA_LIBDIR@]] | ||
LUA_BINDIR=LUA_DIR .. [[@LUA_BINDIR@]] | ||
LUA_INTERPRETER=[[@LUA_INTERPRETER@]] | ||
LUA_SUFFIX=[[@LUA_SUFFIX@]] | ||
|
||
-- LuaRocks | ||
LUAROCKS_PREFIX=root | ||
LUAROCKS_SYSCONFIG=LUAROCKS_PREFIX .. [[@LUAROCKS_SYSCONFIG@]] | ||
LUAROCKS_ROCKS_TREE=LUAROCKS_PREFIX .. [[@LUAROCKS_ROCKS_TREE@]] | ||
LUAROCKS_UNAME_M=[[@LUAROCKS_UNAME_M@]] | ||
LUAROCKS_UNAME_S=[[@LUAROCKS_UNAME_S@]] | ||
--LUAROCKS_DOWNLOADER=[[@LUAROCKS_DOWNLOADER@]] | ||
--LUAROCKS_MD5CHECKER=[[@LUAROCKS_MD5CHECKER@]] | ||
LUAROCKS_FORCE_CONFIG=@LUAROCKS_FORCE_CONFIG@ |
Oops, something went wrong.