-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework cmake variables and defaults. (#13)
- C Lua is the default rather then C++ Lua - Turn off test by default - Rename cmake control variables and prepend LUABIND - Reword and simplify readme.
- Loading branch information
Showing
8 changed files
with
59 additions
and
87 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
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
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
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,16 +1,16 @@ | ||
#ifndef LUABIND_LUA_HPP | ||
#define LUABIND_LUA_HPP | ||
|
||
#ifdef INCLUDE_LUA_LIB_WITH_EXTERN_C | ||
#ifndef LUABIND_LUA_CPP | ||
extern "C" { | ||
#endif // INCLUDE_LUA_LIB_WITH_EXTERN_C | ||
#endif // LUABIND_LUA_CPP | ||
|
||
#include <lua.h> | ||
#include <lauxlib.h> | ||
#include <lualib.h> | ||
|
||
#ifdef INCLUDE_LUA_LIB_WITH_EXTERN_C | ||
#ifndef LUABIND_LUA_CPP | ||
} | ||
#endif // INCLUDE_LUA_LIB_WITH_EXTERN_C | ||
#endif // LUABIND_LUA_CPP | ||
|
||
#endif // LUABIND_LUA_HPP |
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,27 @@ | ||
|
||
include(CTest) | ||
|
||
add_executable(base_class_binding base_class_binding.cpp lua_test.hpp) | ||
target_link_libraries(base_class_binding luabind ${LUA_LIB_NAME} gtest_main) | ||
target_link_libraries(base_class_binding luabind gtest_main) | ||
add_test(NAME base_class_binding_test COMMAND base_class_binding) | ||
|
||
add_executable(binding binding.cpp lua_test.hpp) | ||
target_link_libraries(binding luabind ${LUA_LIB_NAME} gtest_main) | ||
target_link_libraries(binding luabind gtest_main) | ||
add_test(NAME binding_test COMMAND binding) | ||
|
||
add_executable(const_binding const_binding.cpp lua_test.hpp) | ||
target_link_libraries(const_binding luabind ${LUA_LIB_NAME} gtest_main) | ||
target_link_libraries(const_binding luabind gtest_main) | ||
add_test(NAME const_binding_test COMMAND const_binding) | ||
|
||
add_executable(explicit_delete explicit_delete.cpp lua_test.hpp) | ||
target_link_libraries(explicit_delete luabind ${LUA_LIB_NAME} gtest_main) | ||
target_link_libraries(explicit_delete luabind gtest_main) | ||
add_test(NAME explicit_delete_test COMMAND explicit_delete) | ||
|
||
add_executable(custom_functions custom_functions.cpp lua_test.hpp) | ||
target_link_libraries(custom_functions luabind ${LUA_LIB_NAME} gtest_main) | ||
target_link_libraries(custom_functions luabind gtest_main) | ||
add_test(NAME custom_functions_test COMMAND custom_functions) | ||
|
||
add_executable(errors errors.cpp lua_test.hpp) | ||
target_link_libraries(errors luabind ${LUA_LIB_NAME} gtest_main) | ||
target_link_libraries(errors luabind gtest_main) | ||
add_test(NAME errors_test COMMAND errors) | ||
|
||
|
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,7 +1,7 @@ | ||
if(${LUA_LIB_NAME} STREQUAL luabind_lua) | ||
if(${LUABIND_LUA_LIB_NAME} STREQUAL luabind_lua) | ||
add_subdirectory(lua) | ||
endif() | ||
|
||
if(LUABIND_TEST) | ||
if(LUABIND_TESTS) | ||
add_subdirectory(googletest) | ||
endif() |
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,12 +1,7 @@ | ||
set(LUA_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lua) | ||
|
||
file(GLOB luabind_lua_header_files ${LUA_SOURCE_DIR}/*.h) | ||
file(GLOB luabind_lua_sources ${LUA_SOURCE_DIR}/*.c) | ||
list(REMOVE_ITEM luabind_lua_sources "${LUA_SOURCE_DIR}/lua.c" "${LUA_SOURCE_DIR}/luac.c" "${LUA_SOURCE_DIR}/onelua.c" "${LUA_SOURCE_DIR}/ltests.c") | ||
file(GLOB LUABIND_LUA_SOURCES ${LUA_SOURCE_DIR}/*.c) | ||
list(REMOVE_ITEM LUABIND_LUA_SOURCES "${LUA_SOURCE_DIR}/lua.c" "${LUA_SOURCE_DIR}/luac.c" "${LUA_SOURCE_DIR}/onelua.c" "${LUA_SOURCE_DIR}/ltests.c") | ||
|
||
add_library(luabind_lua_headers INTERFACE ${luabind_lua_header_files}) | ||
add_library(luabind_lua STATIC ${luabind_lua_sources}) | ||
|
||
target_include_directories(luabind_lua_headers SYSTEM INTERFACE ${LUA_SOURCE_DIR}) | ||
|
||
target_link_libraries(luabind_lua PUBLIC luabind_lua_headers) | ||
add_library(luabind_lua STATIC ${LUABIND_LUA_SOURCES}) | ||
target_include_directories(luabind_lua SYSTEM INTERFACE ${LUA_SOURCE_DIR}) |
Submodule lua
updated
75 files