Skip to content

Commit

Permalink
added Lua to vendor sources
Browse files Browse the repository at this point in the history
- TODO: add Lua to our makefile eventually
  • Loading branch information
CPunch committed Dec 13, 2023
1 parent d9ebb4e commit 27ccda5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "tdata"]
path = tdata
url = https://github.com/OpenFusionProject/tabledata.git
[submodule "vendor/Lua"]
path = vendor/Lua
url = https://github.com/walterschell/Lua.git
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,28 @@ else()
set(BIN_NAME fusion)
endif()

# add lua
option(LUA_BUILD_COMPILER OFF)
option(LUA_ENABLE_SHARED OFF)
option(LUA_ENABLE_TESTING OFF)
add_subdirectory(vendor/Lua)

include_directories(src vendor)

file(GLOB_RECURSE SOURCES src/**.[ch]pp vendor/**.[ch]pp vendor/**.[ch] version.h)
file(GLOB_RECURSE VENDOR_SOURCES vendor/bcrypt/**.[ch] vendor/mingw/**.h vendor/INIReader.hpp vendor/JSON.hpp)

file(GLOB_RECURSE SOURCES src/**.[ch]pp version.h)

configure_file(version.h.in ${CMAKE_SOURCE_DIR}/version.h @ONLY)

add_executable(openfusion ${SOURCES})
add_executable(openfusion ${SOURCES} ${VENDOR_SOURCES})

set_target_properties(openfusion PROPERTIES OUTPUT_NAME ${BIN_NAME})

# find sqlite3 and use it
find_package(SQLite3 REQUIRED)
target_include_directories(openfusion PRIVATE ${SQLite3_INCLUDE_DIRS})
target_link_libraries(openfusion PRIVATE ${SQLite3_LIBRARIES})
target_link_libraries(openfusion PRIVATE lua_static ${SQLite3_LIBRARIES})

# Makes it so config, tdata, etc. get picked up when starting via the debugger in VS
set_property(TARGET openfusion PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
Expand Down
1 change: 1 addition & 0 deletions vendor/Lua
Submodule Lua added at 88246d

0 comments on commit 27ccda5

Please sign in to comment.