Permalink
Browse files

Cleaned up submodules

  • Loading branch information...
drahosp committed Oct 13, 2011
0 parents commit 8aaf23e1f1edcec73527a27fd620f5ab714d018f
Showing with 6,381 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +68 −0 CMakeLists.txt
  3. +36 −0 config.in
  4. +6,143 −0 dist.manifest
  5. +43 −0 install
  6. +35 −0 install.bat
  7. +54 −0 manifest.lua
@@ -0,0 +1,2 @@
+_*
+.DS_*
@@ -0,0 +1,68 @@
+# Copyright (C) 2011 LuaDist
+# 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.
+#
+# This is a straightforward installer for LuaDist modules.
+
+project ( luadist_installer NONE )
+cmake_minimum_required ( VERSION 2.8 )
+include ( ExternalProject )
+
+## BASIC SETTINGS
+# Build Release by default
+if ( NOT CMAKE_BUILD_TYPE)
+ set ( CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE )
+endif ()
+
+# Install dists required for bootstrap by default
+set ( DISTS bootstrap CACHE STRING "List of dists to install (in order)." )
+string ( REPLACE " " ";" DISTS "${DISTS}" )
+
+# Generate cache
+configure_file ( config.in ${CMAKE_CURRENT_BINARY_DIR}/config.cmake )
+
+## EXTERNAL PROJECTS
+# Download and build external project using generated cache
+macro ( install_dist _DIST )
+ string ( REGEX MATCH "^([a-z]+[a-z0-9_.:-]*[a-z0-9]+)-?([^-]*)$" _DIST_NAME ${_DIST} )
+ set ( _DIST_NAME ${CMAKE_MATCH_1} )
+ set ( _DIST_VER ${CMAKE_MATCH_2} )
+
+ # If no specific version was requested
+ if ( _DIST_VER STREQUAL "" )
+ # Use master branch
+ set ( _DIST_VER master )
+ endif ()
+
+ # Use local submodules if they are availble, use git if not
+ if ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_DIST_NAME}/CMakeLists.txt )
+ set ( _DIST_SOURCE SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${_DIST_NAME} )
+ else ()
+ set ( _DIST_SOURCE GIT_REPOSITORY http://github.com/LuaDist/${_DIST_NAME}.git GIT_TAG ${_DIST_VER} )
+ endif ()
+
+ # Build project using the generated settings in cache
+ ExternalProject_Add( ${_DIST_NAME}
+ PREFIX ${_DIST_NAME}-${_DIST_VER}
+ ${_DIST_SOURCE}
+ BINARY_DIR ${_DIST_NAME}-${_DIST_VER}
+ INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
+ CMAKE_ARGS -C ${CMAKE_CURRENT_BINARY_DIR}/config.cmake
+ DEPENDS ${_PREV}
+ )
+ set ( _PREV ${_DIST_NAME})
+ list ( APPEND DEPS ${_DIST_NAME} )
+endmacro ()
+
+# Chanin to build all dists
+foreach ( DIST ${DISTS} )
+ install_dist ( ${DIST} )
+endforeach ()
+
+## INSTALL
+# Depend on the dist depencency chain
+add_custom_target ( install
+ COMMAND echo "Installation Complete."
+ DEPENDS ${_PREV}
+)
@@ -0,0 +1,36 @@
+## Global settings for LuaDist
+# NOTE these settings HAVE to be CACHE FORCE to take precedence.
+
+# Basic (Obrained from master script)
+set ( CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE STRING "Installation destination." FORCE )
+set ( CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Build type." FORCE )
+set ( CMAKE_INCLUDE_PATH "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Where to search for headers." FORCE )
+set ( CMAKE_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/lib" CACHE STRING "Where to search for libraries." FORCE )
+set ( CMAKE_PROGRAM_PATH "${CMAKE_INSTALL_PREFIX}/bin" CACHE STRING "Where to search for applications." FORCE )
+
+# RPath functionality
+set ( CMAKE_SKIP_BUILD_RPATH FALSE CACHE STRING "" FORCE )
+set ( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE CACHE STRING "" FORCE )
+set ( CMAKE_INSTALL_RPATH $ORIGIN/../lib CACHE STRING "" FORCE )
+set ( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE STRING "" FORCE )
+set ( CMAKE_INSTALL_NAME_DIR @executable_path/../lib CACHE STRING "" FORCE )
+
+# Install Paths
+set ( INSTALL_BIN bin CACHE STRING "Where to install binaries to." FORCE )
+set ( INSTALL_LIB lib CACHE STRING "Where to install libraries to." FORCE )
+set ( INSTALL_INC include CACHE STRING "Where to install headers to." FORCE )
+set ( INSTALL_ETC etc CACHE STRING "Where to store configuration files." FORCE )
+set ( INSTALL_SHARE share CACHE STRING "Where to install package data." FORCE )
+set ( INSTALL_LMOD lib/lua CACHE STRING "Directory to install Lua modules." FORCE )
+set ( INSTALL_CMOD lib/lua CACHE STRING "Directory to install Lua binary modules." FORCE )
+
+# Install skip options
+set ( SKIP_TESTING OFF CACHE STRING "Do not test packages." FORCE )
+set ( SKIP_LUA_WRAPPER OFF CACHE STRING "Do not generate binary wrappers." FORCE )
+set ( SKIP_INSTALL_DATA OFF CACHE STRING "Do not install any package data." FORCE )
+set ( SKIP_INSTALL_DOC OFF CACHE STRING "Do not install documentation." FORCE )
+set ( SKIP_INSTALL_EXAMPLE OFF CACHE STRING "Do not install examples." FORCE )
+set ( SKIP_INSTALL_TEST OFF CACHE STRING "Do not install tests." FORCE )
+set ( SKIP_INSTALL_FOO OFF CACHE STRING "Do not install additional files." FORCE )
+
+# Other (eg. cross-compile settings)
Oops, something went wrong.

0 comments on commit 8aaf23e

Please sign in to comment.