This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update dist.cmake and fix tests
- Loading branch information
Showing
2 changed files
with
431 additions
and
108 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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
# Copyright (C) 2007-2009 LuaDist. | ||
# Copyright (C) 2007-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(luaexpat C) | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) | ||
INCLUDE(dist.cmake) | ||
project ( luaexpat C ) | ||
cmake_minimum_required ( VERSION 2.6 ) | ||
include ( dist.cmake ) | ||
|
||
# Find Expat | ||
FIND_PACKAGE (EXPAT REQUIRED) | ||
INCLUDE_DIRECTORIES (${EXPAT_INCLUDE_DIR}) | ||
find_package ( EXPAT REQUIRED ) | ||
include_directories ( ${EXPAT_INCLUDE_DIR} ) | ||
|
||
# Build LuaExpat module | ||
ADD_LUA_MODULE(lxp src/lxplib.c src/lxp.def) | ||
TARGET_LINK_LIBRARIES(lxp ${EXPAT_LIBRARIES}) | ||
install_lua_module ( lxp src/lxplib.c src/lxp.def ) | ||
target_link_libraries ( lxp ${EXPAT_LIBRARIES} ) | ||
|
||
# Install LuaExpat | ||
INSTALL (TARGETS lxp LIBRARY DESTINATION ${INSTALL_CMOD}) | ||
INSTALL (FILES src/lxp/lom.lua DESTINATION ${INSTALL_LMOD}/lxp) | ||
INSTALL(FILES README DESTINATION ${INSTALL_DATA}) | ||
INSTALL(DIRECTORY doc/ DESTINATION ${INSTALL_DOC}) | ||
INSTALL(DIRECTORY tests/ DESTINATION ${INSTALL_TEST}) | ||
|
||
ADD_LUA_TEST(tests/test.lua) | ||
ADD_LUA_TEST(tests/test-lom.lua) # FIX: need to add src/?.lua to package.path | ||
install_lua_module ( lxp.lom src/lxp/lom.lua ) | ||
install_data ( README ) | ||
install_doc ( doc/ ) | ||
install_test ( tests/ ) | ||
|
||
add_lua_test ( tests/test.lua ) | ||
add_lua_test ( tests/test-lom.lua | ||
${CMAKE_CURRENT_SOURCE_DIR}/src # workaround to add modules to package.path (improve?) | ||
) |
Oops, something went wrong.