Made CMakesLists more generic for Lua include dir. mysin now works like it should

This commit is contained in:
2024-08-05 12:24:07 -04:00
parent 7e681a291f
commit 1e9af84c8b
2 changed files with 5 additions and 3 deletions

View File

@@ -17,7 +17,9 @@ include(cmake/CPM.cmake)
file(GLOB_RECURSE ReScript_HEADERS "include/ReScript/*.hpp" "include/ReScript/*.h")
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)
add_library(ReScript SHARED ${ReScript_SRC})
@@ -29,7 +31,7 @@ endif()
set_target_properties(ReScript PROPERTIES LINKER_LANGUAGE CXX)
FIND_PACKAGE(Lua 5.3 REQUIRED)
CPMAddPackage(
NAME Event

View File

@@ -9,7 +9,7 @@ static int l_sin (lua_State *L) {
//lua_pushnumber(L, sin(d));
LuaNumber LN = LuaNumber();
LN.Pull(L, 1);
LuaNumber LN2 = LN.Value();
LuaNumber LN2 = sin(LN.Value());
//LN2.Push(L);
DEBUG(std::to_string(LN.Value()));
DEBUG(std::to_string(LN2.Value()));