# Copyright (C) 2007-2009 LuaDist. # Created by Peter Kapec # 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(lazykit C) CMAKE_MINIMUM_REQUIRED (VERSION 2.6) # Where to install module parts: SET (INSTALL_LMOD share/lua/lmod CACHE PATH "Directory to install Lua modules.") SET (INSTALL_CMOD share/lua/cmod CACHE PATH "Directory to install Lua binary modules.") SET (INSTALL_DATA . CACHE PATH "Directory the package can store documentation, tests or other data in.") SET (INSTALL_TEST ${INSTALL_DATA}/test CACHE PATH "Recommended directory to install tests into.") SET (INSTALL_DOC ${INSTALL_DATA}/doc CACHE PATH "Recommended directory to install documentation into.") SET (INSTALL_EXAMPLE ${INSTALL_DATA}/example CACHE PATH "Recommended directory to install examples into.") # Find Lua FIND_PACKAGE (Lua51 REQUIRED) INCLUDE_DIRECTORIES( ${LUA_INCLUDE_DIR}) # LazyKit C modules ADD_LIBRARY(ciostring MODULE ciostring/iostring.c) TARGET_LINK_LIBRARIES(ciostring ${LUA_LIBRARY}) SET_TARGET_PROPERTIES(ciostring PROPERTIES PREFIX "") INSTALL (TARGETS ciostring DESTINATION ${INSTALL_CMOD}) # LazyKit Lua modules INSTALL (FILES iostring.lua ioxmlgen.lua lazytree.lua lxpevent.lua lxptree.lua xmlgen.lua xmliter.lua xmlview.lua ciostring/concatxmlgen.lua DESTINATION ${INSTALL_LMOD}) # Install LazyKit Documentation INSTALL(FILES README DESTINATION ${INSTALL_DATA}) INSTALL(DIRECTORY doc/ DESTINATION ${INSTALL_DOC}) # LazyKit tests and samples INSTALL(DIRECTORY examples/ DESTINATION ${INSTALL_EXAMPLE}) INSTALL(FILES ciostring/benchmark.lua DESTINATION ${INSTALL_TEST})