# 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(lpc C) # Where to install module parts: 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.") # CMake configuration: CMAKE_MINIMUM_REQUIRED(VERSION 2.6 ) # We need Lua to compile FIND_PACKAGE(Lua51 REQUIRED) INCLUDE_DIRECTORIES( ${LUA_INCLUDE_DIR}) # Build ADD_LIBRARY(lpc MODULE lpc.c) TARGET_LINK_LIBRARIES(lpc ${LUA_LIBRARY}) SET_TARGET_PROPERTIES(lpc PROPERTIES PREFIX "") # Install all files and documentation INSTALL(TARGETS lpc DESTINATION ${INSTALL_CMOD}) INSTALL(FILES COPYING DESTINATION ${INSTALL_DATA})