diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f3a815..1547304 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,7 @@ endif () find_package(Threads REQUIRED) find_package(PugiXML CONFIG REQUIRED) find_package(Lua54 REQUIRED) +find_package(Sol2 REQUIRED) find_package(Boost 1.66.0 REQUIRED COMPONENTS system iostreams) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c80e24b..4002904 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,3 @@ -add_subdirectory(luamodules) - set(tfs_SRC ${CMAKE_CURRENT_LIST_DIR}/otpch.cpp ${CMAKE_CURRENT_LIST_DIR}/actions.cpp @@ -33,40 +31,40 @@ set(tfs_SRC ${CMAKE_CURRENT_LIST_DIR}/iomapserialize.cpp ${CMAKE_CURRENT_LIST_DIR}/item.cpp ${CMAKE_CURRENT_LIST_DIR}/items.cpp - ${CMAKE_CURRENT_LIST_DIR}/luaactions.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luacombat.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luacondition.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luacontainer.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luacreature.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luacreatureevent.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luagame.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaglobalevent.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luagroup.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaguild.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luahouse.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaitem.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaitemtype.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/lualoot.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luamonster.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luamonsterspell.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luamonstertype.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luamoveevent.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luanetworkmessage.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luanpc.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaoutfit.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaparty.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaplayer.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaposition.cpp" /> + ${CMAKE_CURRENT_LIST_DIR}/luaactions.cpp + ${CMAKE_CURRENT_LIST_DIR}/luacombat.cpp + ${CMAKE_CURRENT_LIST_DIR}/luacondition.cpp + ${CMAKE_CURRENT_LIST_DIR}/luacontainer.cpp + ${CMAKE_CURRENT_LIST_DIR}/luacreature.cpp + ${CMAKE_CURRENT_LIST_DIR}/luacreatureevent.cpp + ${CMAKE_CURRENT_LIST_DIR}/luagame.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaglobalevent.cpp + ${CMAKE_CURRENT_LIST_DIR}/luagroup.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaguild.cpp + ${CMAKE_CURRENT_LIST_DIR}/luahouse.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaitem.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaitemtype.cpp + ${CMAKE_CURRENT_LIST_DIR}/lualoot.cpp + ${CMAKE_CURRENT_LIST_DIR}/luamonster.cpp + ${CMAKE_CURRENT_LIST_DIR}/luamonsterspell.cpp + ${CMAKE_CURRENT_LIST_DIR}/luamonstertype.cpp + ${CMAKE_CURRENT_LIST_DIR}/luamoveevent.cpp + ${CMAKE_CURRENT_LIST_DIR}/luanetworkmessage.cpp + ${CMAKE_CURRENT_LIST_DIR}/luanpc.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaoutfit.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaparty.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaplayer.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaposition.cpp ${CMAKE_CURRENT_LIST_DIR}/luascript.cpp - ${CMAKE_CURRENT_LIST_DIR}/luaspells.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luatalkaction.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luateleport.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luatile.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luatown.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luavariant.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luavocation.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaweapons.cpp" /> - ${CMAKE_CURRENT_LIST_DIR}/luaxml.cpp" /> + ${CMAKE_CURRENT_LIST_DIR}/luaspells.cpp + ${CMAKE_CURRENT_LIST_DIR}/luatalkaction.cpp + ${CMAKE_CURRENT_LIST_DIR}/luateleport.cpp + ${CMAKE_CURRENT_LIST_DIR}/luatile.cpp + ${CMAKE_CURRENT_LIST_DIR}/luatown.cpp + ${CMAKE_CURRENT_LIST_DIR}/luavariant.cpp + ${CMAKE_CURRENT_LIST_DIR}/luavocation.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaweapons.cpp + ${CMAKE_CURRENT_LIST_DIR}/luaxml.cpp ${CMAKE_CURRENT_LIST_DIR}/mailbox.cpp ${CMAKE_CURRENT_LIST_DIR}/map.cpp ${CMAKE_CURRENT_LIST_DIR}/matrixarea.cpp @@ -202,6 +200,7 @@ target_link_libraries(tfslib PRIVATE Boost::iostreams Boost::system fmt::fmt + sol2::sol2 pugixml::pugixml ${CMAKE_THREAD_LIBS_INIT} ${Crypto++_LIBRARIES} diff --git a/vc17/theforgottenserver.vcxproj b/vc17/theforgottenserver.vcxproj index bea90aa..364d317 100644 --- a/vc17/theforgottenserver.vcxproj +++ b/vc17/theforgottenserver.vcxproj @@ -87,6 +87,10 @@ $(ProjectName)-$(Platform) $(VC_IncludePath);$(WindowsSDK_IncludePath); + + true + true + _CONSOLE;$(PREPROCESSOR_DEFS);%(PreprocessorDefinitions) @@ -95,7 +99,7 @@ true AdvancedVectorExtensions $(VcpkgRoot)include\%(AdditionalIncludeDirectories) - stdcpp17 + stdcpp20 MachineX86 @@ -110,7 +114,7 @@ true AdvancedVectorExtensions $(VcpkgRoot)include\%(AdditionalIncludeDirectories) - stdcpp17 + stdcpp20 true @@ -128,7 +132,7 @@ true AdvancedVectorExtensions $(VcpkgRoot)include\luajit;%(AdditionalIncludeDirectories) - stdcpp17 + stdcpp20 MachineX86 @@ -362,4 +366,4 @@ - + \ No newline at end of file diff --git a/vc17/theforgottenserver.vcxproj.filters b/vc17/theforgottenserver.vcxproj.filters index b9f9762..40f18f4 100644 --- a/vc17/theforgottenserver.vcxproj.filters +++ b/vc17/theforgottenserver.vcxproj.filters @@ -73,6 +73,7 @@ + @@ -213,7 +214,6 @@ - @@ -267,4 +267,4 @@ {9156d8f4-e8e6-4a03-bbf7-dcc7e7357a85} - + \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 7a2dfe2..6dd9ebd 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -10,7 +10,8 @@ "fmt", "libmariadb", "lua", - "pugixml" + "pugixml", + "sol2" ], "features": { "luajit": {