Made CMakesLists more generic for Lua include dir. mysin now works like it should
This commit is contained in:
@@ -17,7 +17,9 @@ include(cmake/CPM.cmake)
|
|||||||
file(GLOB_RECURSE ReScript_HEADERS "include/ReScript/*.hpp" "include/ReScript/*.h")
|
file(GLOB_RECURSE ReScript_HEADERS "include/ReScript/*.hpp" "include/ReScript/*.h")
|
||||||
file(GLOB_RECURSE ReScript_SRC "src/ReScript/*.cpp" "src/ReScript/*.c")
|
file(GLOB_RECURSE ReScript_SRC "src/ReScript/*.cpp" "src/ReScript/*.c")
|
||||||
|
|
||||||
include_directories("include")
|
FIND_PACKAGE(Lua 5.3 REQUIRED)
|
||||||
|
|
||||||
|
include_directories("include" ${LUA_INCLUDE_DIR})
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
add_library(ReScript SHARED ${ReScript_SRC})
|
add_library(ReScript SHARED ${ReScript_SRC})
|
||||||
@@ -29,7 +31,7 @@ endif()
|
|||||||
|
|
||||||
set_target_properties(ReScript PROPERTIES LINKER_LANGUAGE CXX)
|
set_target_properties(ReScript PROPERTIES LINKER_LANGUAGE CXX)
|
||||||
|
|
||||||
FIND_PACKAGE(Lua 5.3 REQUIRED)
|
|
||||||
|
|
||||||
CPMAddPackage(
|
CPMAddPackage(
|
||||||
NAME Event
|
NAME Event
|
||||||
|
2
main.cpp
2
main.cpp
@@ -9,7 +9,7 @@ static int l_sin (lua_State *L) {
|
|||||||
//lua_pushnumber(L, sin(d));
|
//lua_pushnumber(L, sin(d));
|
||||||
LuaNumber LN = LuaNumber();
|
LuaNumber LN = LuaNumber();
|
||||||
LN.Pull(L, 1);
|
LN.Pull(L, 1);
|
||||||
LuaNumber LN2 = LN.Value();
|
LuaNumber LN2 = sin(LN.Value());
|
||||||
//LN2.Push(L);
|
//LN2.Push(L);
|
||||||
DEBUG(std::to_string(LN.Value()));
|
DEBUG(std::to_string(LN.Value()));
|
||||||
DEBUG(std::to_string(LN2.Value()));
|
DEBUG(std::to_string(LN2.Value()));
|
||||||
|
Reference in New Issue
Block a user