1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00
vcmi/scripting/lua/CMakeLists.txt
AlexVinS ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00

58 lines
1.6 KiB
CMake

include_directories(${Boost_INCLUDE_DIRS} ${LUA_INCLUDE_DIR} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
set(lib_SRCS
StdInc.cpp
LuaReference.cpp
LuaScriptModule.cpp
LuaScriptingContext.cpp
LuaSpellEffect.cpp
LuaStack.cpp
api/battle/UnitProxy.cpp
api/events/BattleEvents.cpp
api/events/EventBusProxy.cpp
api/events/GenericEvents.cpp
api/events/SubscriptionRegistryProxy.cpp
api/netpacks/BattleLogMessage.cpp
api/netpacks/BattleStackMoved.cpp
api/netpacks/BattleUnitsChanged.cpp
api/netpacks/EntitiesChanged.cpp
api/netpacks/InfoWindow.cpp
api/netpacks/SetResources.cpp
api/Artifact.cpp
api/BattleCb.cpp
api/BonusSystem.cpp
api/Creature.cpp
api/Faction.cpp
api/GameCb.cpp
api/HeroClass.cpp
api/HeroInstance.cpp
api/HeroType.cpp
api/Registry.cpp
api/ServerCb.cpp
api/Services.cpp
api/Skill.cpp
api/Spell.cpp
api/StackInstance.cpp
)
add_library(vcmiLua SHARED ${lib_SRCS})
target_link_libraries(vcmiLua ${Boost_LIBRARIES} ${LUA_LIBRARY} vcmi)
vcmi_set_output_dir(vcmiLua "scripting")
set_target_properties(vcmiLua PROPERTIES ${PCH_PROPERTIES})
cotire(vcmiLua)
install(TARGETS vcmiLua DESTINATION ${SCRIPTING_LIB_DIR})
#manually copy lua dll from vcpkg folder to build directory on windows since vcpkg deps copy feature has flaws, using hardcoded paths based on vcmi windows deps package 1.1 from github
if(MSVC)
if(EXISTS ${LUA_INCLUDE_DIR}/../../bin/lua51.dll)
file(COPY ${LUA_INCLUDE_DIR}/../../bin/lua51.dll DESTINATION ${CMAKE_BINARY_DIR}/bin)
endif()
endif()