1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-02 00:10:22 +02:00

Removed cmake_modules/VCMI_lib macro, use it directly in place

This commit is contained in:
Ivan Savenko 2024-02-11 20:38:24 +02:00
parent 30d677724b
commit a909d7ddde
13 changed files with 770 additions and 776 deletions

View File

@ -39,7 +39,7 @@ else()
endif()
target_include_directories(BattleAI PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(BattleAI PRIVATE ${VCMI_LIB_TARGET} TBB::tbb)
target_link_libraries(BattleAI PRIVATE vcmi TBB::tbb)
vcmi_set_output_dir(BattleAI "AI")
enable_pch(BattleAI)

View File

@ -21,7 +21,7 @@ else()
endif()
target_include_directories(EmptyAI PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(EmptyAI PRIVATE ${VCMI_LIB_TARGET})
target_link_libraries(EmptyAI PRIVATE vcmi)
vcmi_set_output_dir(EmptyAI "AI")
enable_pch(EmptyAI)

View File

@ -138,7 +138,7 @@ else()
endif()
target_include_directories(Nullkiller PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(Nullkiller PUBLIC ${VCMI_LIB_TARGET} fuzzylite::fuzzylite TBB::tbb)
target_link_libraries(Nullkiller PUBLIC vcmi fuzzylite::fuzzylite TBB::tbb)
vcmi_set_output_dir(Nullkiller "AI")
enable_pch(Nullkiller)

View File

@ -20,7 +20,7 @@ else()
install(TARGETS StupidAI RUNTIME DESTINATION ${AI_LIB_DIR} LIBRARY DESTINATION ${AI_LIB_DIR})
endif()
target_link_libraries(StupidAI PRIVATE ${VCMI_LIB_TARGET})
target_link_libraries(StupidAI PRIVATE vcmi)
target_include_directories(StupidAI PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
vcmi_set_output_dir(StupidAI "AI")

View File

@ -107,7 +107,7 @@ else()
endif()
target_include_directories(VCAI PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(VCAI PUBLIC ${VCMI_LIB_TARGET} fuzzylite::fuzzylite)
target_link_libraries(VCAI PUBLIC vcmi fuzzylite::fuzzylite)
vcmi_set_output_dir(VCAI "AI")
enable_pch(VCAI)

View File

@ -608,10 +608,8 @@ if(APPLE_IOS)
add_subdirectory(ios)
endif()
set(VCMI_LIB_TARGET vcmi)
add_subdirectory_with_folder("AI" AI)
include(VCMI_lib)
add_subdirectory(lib)
add_subdirectory(server)

View File

@ -458,7 +458,7 @@ if(ENABLE_SINGLE_APP_BUILD AND ENABLE_LAUNCHER)
endif()
target_link_libraries(vcmiclient PRIVATE
${VCMI_LIB_TARGET} SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF
vcmi SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF
)
if(ffmpeg_LIBRARIES)

View File

@ -1,757 +0,0 @@
macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
if(NOT DEFINED MAIN_LIB_DIR)
set(MAIN_LIB_DIR "${CMAKE_SOURCE_DIR}/lib")
endif()
set(lib_SRCS
${MAIN_LIB_DIR}/StdInc.cpp
${MAIN_LIB_DIR}/battle/AccessibilityInfo.cpp
${MAIN_LIB_DIR}/battle/BattleAction.cpp
${MAIN_LIB_DIR}/battle/BattleAttackInfo.cpp
${MAIN_LIB_DIR}/battle/BattleHex.cpp
${MAIN_LIB_DIR}/battle/BattleInfo.cpp
${MAIN_LIB_DIR}/battle/BattleProxy.cpp
${MAIN_LIB_DIR}/battle/BattleStateInfoForRetreat.cpp
${MAIN_LIB_DIR}/battle/CBattleInfoCallback.cpp
${MAIN_LIB_DIR}/battle/CBattleInfoEssentials.cpp
${MAIN_LIB_DIR}/battle/CObstacleInstance.cpp
${MAIN_LIB_DIR}/battle/CPlayerBattleCallback.cpp
${MAIN_LIB_DIR}/battle/CUnitState.cpp
${MAIN_LIB_DIR}/battle/DamageCalculator.cpp
${MAIN_LIB_DIR}/battle/Destination.cpp
${MAIN_LIB_DIR}/battle/IBattleState.cpp
${MAIN_LIB_DIR}/battle/ReachabilityInfo.cpp
${MAIN_LIB_DIR}/battle/SideInBattle.cpp
${MAIN_LIB_DIR}/battle/SiegeInfo.cpp
${MAIN_LIB_DIR}/battle/Unit.cpp
${MAIN_LIB_DIR}/bonuses/Bonus.cpp
${MAIN_LIB_DIR}/bonuses/BonusEnum.cpp
${MAIN_LIB_DIR}/bonuses/BonusList.cpp
${MAIN_LIB_DIR}/bonuses/BonusParams.cpp
${MAIN_LIB_DIR}/bonuses/BonusSelector.cpp
${MAIN_LIB_DIR}/bonuses/BonusCustomTypes.cpp
${MAIN_LIB_DIR}/bonuses/CBonusProxy.cpp
${MAIN_LIB_DIR}/bonuses/CBonusSystemNode.cpp
${MAIN_LIB_DIR}/bonuses/IBonusBearer.cpp
${MAIN_LIB_DIR}/bonuses/Limiters.cpp
${MAIN_LIB_DIR}/bonuses/Propagators.cpp
${MAIN_LIB_DIR}/bonuses/Updaters.cpp
${MAIN_LIB_DIR}/campaign/CampaignHandler.cpp
${MAIN_LIB_DIR}/campaign/CampaignState.cpp
${MAIN_LIB_DIR}/constants/EntityIdentifiers.cpp
${MAIN_LIB_DIR}/events/ApplyDamage.cpp
${MAIN_LIB_DIR}/events/GameResumed.cpp
${MAIN_LIB_DIR}/events/ObjectVisitEnded.cpp
${MAIN_LIB_DIR}/events/ObjectVisitStarted.cpp
${MAIN_LIB_DIR}/events/PlayerGotTurn.cpp
${MAIN_LIB_DIR}/events/TurnStarted.cpp
${MAIN_LIB_DIR}/filesystem/AdapterLoaders.cpp
${MAIN_LIB_DIR}/filesystem/CArchiveLoader.cpp
${MAIN_LIB_DIR}/filesystem/CBinaryReader.cpp
${MAIN_LIB_DIR}/filesystem/CCompressedStream.cpp
${MAIN_LIB_DIR}/filesystem/CFileInputStream.cpp
${MAIN_LIB_DIR}/filesystem/CFilesystemLoader.cpp
${MAIN_LIB_DIR}/filesystem/CMemoryBuffer.cpp
${MAIN_LIB_DIR}/filesystem/CMemoryStream.cpp
${MAIN_LIB_DIR}/filesystem/CZipLoader.cpp
${MAIN_LIB_DIR}/filesystem/CZipSaver.cpp
${MAIN_LIB_DIR}/filesystem/FileInfo.cpp
${MAIN_LIB_DIR}/filesystem/Filesystem.cpp
${MAIN_LIB_DIR}/filesystem/MinizipExtensions.cpp
${MAIN_LIB_DIR}/filesystem/ResourcePath.cpp
${MAIN_LIB_DIR}/gameState/CGameState.cpp
${MAIN_LIB_DIR}/gameState/CGameStateCampaign.cpp
${MAIN_LIB_DIR}/gameState/InfoAboutArmy.cpp
${MAIN_LIB_DIR}/gameState/TavernHeroesPool.cpp
${MAIN_LIB_DIR}/logging/CBasicLogConfigurator.cpp
${MAIN_LIB_DIR}/logging/CLogger.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/AObjectTypeHandler.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/CBankInstanceConstructor.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/CObjectClassesHandler.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/CommonConstructors.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/CRewardableConstructor.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/DwellingInstanceConstructor.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/HillFortInstanceConstructor.cpp
${MAIN_LIB_DIR}/mapObjectConstructors/ShipyardInstanceConstructor.cpp
${MAIN_LIB_DIR}/mapObjects/CArmedInstance.cpp
${MAIN_LIB_DIR}/mapObjects/CBank.cpp
${MAIN_LIB_DIR}/mapObjects/CGCreature.cpp
${MAIN_LIB_DIR}/mapObjects/CGDwelling.cpp
${MAIN_LIB_DIR}/mapObjects/CGHeroInstance.cpp
${MAIN_LIB_DIR}/mapObjects/CGMarket.cpp
${MAIN_LIB_DIR}/mapObjects/CGObjectInstance.cpp
${MAIN_LIB_DIR}/mapObjects/CGPandoraBox.cpp
${MAIN_LIB_DIR}/mapObjects/CGTownBuilding.cpp
${MAIN_LIB_DIR}/mapObjects/CGTownInstance.cpp
${MAIN_LIB_DIR}/mapObjects/CObjectHandler.cpp
${MAIN_LIB_DIR}/mapObjects/CQuest.cpp
${MAIN_LIB_DIR}/mapObjects/CRewardableObject.cpp
${MAIN_LIB_DIR}/mapObjects/IMarket.cpp
${MAIN_LIB_DIR}/mapObjects/IObjectInterface.cpp
${MAIN_LIB_DIR}/mapObjects/MiscObjects.cpp
${MAIN_LIB_DIR}/mapObjects/ObjectTemplate.cpp
${MAIN_LIB_DIR}/mapping/CDrawRoadsOperation.cpp
${MAIN_LIB_DIR}/mapping/CMap.cpp
${MAIN_LIB_DIR}/mapping/CMapHeader.cpp
${MAIN_LIB_DIR}/mapping/CMapEditManager.cpp
${MAIN_LIB_DIR}/mapping/CMapInfo.cpp
${MAIN_LIB_DIR}/mapping/CMapOperation.cpp
${MAIN_LIB_DIR}/mapping/CMapService.cpp
${MAIN_LIB_DIR}/mapping/MapEditUtils.cpp
${MAIN_LIB_DIR}/mapping/MapIdentifiersH3M.cpp
${MAIN_LIB_DIR}/mapping/MapFeaturesH3M.cpp
${MAIN_LIB_DIR}/mapping/MapFormatH3M.cpp
${MAIN_LIB_DIR}/mapping/MapReaderH3M.cpp
${MAIN_LIB_DIR}/mapping/MapFormatJson.cpp
${MAIN_LIB_DIR}/mapping/ObstacleProxy.cpp
${MAIN_LIB_DIR}/modding/ActiveModsInSaveList.cpp
${MAIN_LIB_DIR}/modding/CModHandler.cpp
${MAIN_LIB_DIR}/modding/CModInfo.cpp
${MAIN_LIB_DIR}/modding/CModVersion.cpp
${MAIN_LIB_DIR}/modding/ContentTypeHandler.cpp
${MAIN_LIB_DIR}/modding/IdentifierStorage.cpp
${MAIN_LIB_DIR}/modding/ModUtility.cpp
${MAIN_LIB_DIR}/network/NetworkConnection.cpp
${MAIN_LIB_DIR}/network/NetworkHandler.cpp
${MAIN_LIB_DIR}/network/NetworkServer.cpp
${MAIN_LIB_DIR}/networkPacks/NetPacksLib.cpp
${MAIN_LIB_DIR}/pathfinder/CGPathNode.cpp
${MAIN_LIB_DIR}/pathfinder/CPathfinder.cpp
${MAIN_LIB_DIR}/pathfinder/NodeStorage.cpp
${MAIN_LIB_DIR}/pathfinder/PathfinderOptions.cpp
${MAIN_LIB_DIR}/pathfinder/PathfindingRules.cpp
${MAIN_LIB_DIR}/pathfinder/TurnInfo.cpp
${MAIN_LIB_DIR}/rewardable/Configuration.cpp
${MAIN_LIB_DIR}/rewardable/Info.cpp
${MAIN_LIB_DIR}/rewardable/Interface.cpp
${MAIN_LIB_DIR}/rewardable/Limiter.cpp
${MAIN_LIB_DIR}/rewardable/Reward.cpp
${MAIN_LIB_DIR}/rmg/RmgArea.cpp
${MAIN_LIB_DIR}/rmg/RmgObject.cpp
${MAIN_LIB_DIR}/rmg/RmgPath.cpp
${MAIN_LIB_DIR}/rmg/CMapGenerator.cpp
${MAIN_LIB_DIR}/rmg/CMapGenOptions.cpp
${MAIN_LIB_DIR}/rmg/CRmgTemplate.cpp
${MAIN_LIB_DIR}/rmg/CRmgTemplateStorage.cpp
${MAIN_LIB_DIR}/rmg/CZonePlacer.cpp
${MAIN_LIB_DIR}/rmg/TileInfo.cpp
${MAIN_LIB_DIR}/rmg/Zone.cpp
${MAIN_LIB_DIR}/rmg/Functions.cpp
${MAIN_LIB_DIR}/rmg/RmgMap.cpp
${MAIN_LIB_DIR}/rmg/PenroseTiling.cpp
${MAIN_LIB_DIR}/rmg/modificators/Modificator.cpp
${MAIN_LIB_DIR}/rmg/modificators/ObjectManager.cpp
${MAIN_LIB_DIR}/rmg/modificators/ObjectDistributor.cpp
${MAIN_LIB_DIR}/rmg/modificators/RoadPlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/TreasurePlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/PrisonHeroPlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/QuestArtifactPlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/ConnectionsPlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/WaterAdopter.cpp
${MAIN_LIB_DIR}/rmg/modificators/MinePlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/TownPlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/WaterProxy.cpp
${MAIN_LIB_DIR}/rmg/modificators/WaterRoutes.cpp
${MAIN_LIB_DIR}/rmg/modificators/RockPlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/RockFiller.cpp
${MAIN_LIB_DIR}/rmg/modificators/ObstaclePlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/RiverPlacer.cpp
${MAIN_LIB_DIR}/rmg/modificators/TerrainPainter.cpp
${MAIN_LIB_DIR}/rmg/threadpool/MapProxy.cpp
${MAIN_LIB_DIR}/serializer/BinaryDeserializer.cpp
${MAIN_LIB_DIR}/serializer/BinarySerializer.cpp
${MAIN_LIB_DIR}/serializer/CLoadFile.cpp
${MAIN_LIB_DIR}/serializer/CMemorySerializer.cpp
${MAIN_LIB_DIR}/serializer/Connection.cpp
${MAIN_LIB_DIR}/serializer/CSaveFile.cpp
${MAIN_LIB_DIR}/serializer/CSerializer.cpp
${MAIN_LIB_DIR}/serializer/CTypeList.cpp
${MAIN_LIB_DIR}/serializer/JsonDeserializer.cpp
${MAIN_LIB_DIR}/serializer/JsonSerializeFormat.cpp
${MAIN_LIB_DIR}/serializer/JsonSerializer.cpp
${MAIN_LIB_DIR}/serializer/JsonUpdater.cpp
${MAIN_LIB_DIR}/spells/AbilityCaster.cpp
${MAIN_LIB_DIR}/spells/AdventureSpellMechanics.cpp
${MAIN_LIB_DIR}/spells/BattleSpellMechanics.cpp
${MAIN_LIB_DIR}/spells/BonusCaster.cpp
${MAIN_LIB_DIR}/spells/CSpellHandler.cpp
${MAIN_LIB_DIR}/spells/ExternalCaster.cpp
${MAIN_LIB_DIR}/spells/ISpellMechanics.cpp
${MAIN_LIB_DIR}/spells/ObstacleCasterProxy.cpp
${MAIN_LIB_DIR}/spells/Problem.cpp
${MAIN_LIB_DIR}/spells/ProxyCaster.cpp
${MAIN_LIB_DIR}/spells/TargetCondition.cpp
${MAIN_LIB_DIR}/spells/ViewSpellInt.cpp
${MAIN_LIB_DIR}/spells/effects/Catapult.cpp
${MAIN_LIB_DIR}/spells/effects/Clone.cpp
${MAIN_LIB_DIR}/spells/effects/Damage.cpp
${MAIN_LIB_DIR}/spells/effects/DemonSummon.cpp
${MAIN_LIB_DIR}/spells/effects/Dispel.cpp
${MAIN_LIB_DIR}/spells/effects/Effect.cpp
${MAIN_LIB_DIR}/spells/effects/Effects.cpp
${MAIN_LIB_DIR}/spells/effects/Heal.cpp
${MAIN_LIB_DIR}/spells/effects/LocationEffect.cpp
${MAIN_LIB_DIR}/spells/effects/Moat.cpp
${MAIN_LIB_DIR}/spells/effects/Obstacle.cpp
${MAIN_LIB_DIR}/spells/effects/Registry.cpp
${MAIN_LIB_DIR}/spells/effects/UnitEffect.cpp
${MAIN_LIB_DIR}/spells/effects/Summon.cpp
${MAIN_LIB_DIR}/spells/effects/Teleport.cpp
${MAIN_LIB_DIR}/spells/effects/Timed.cpp
${MAIN_LIB_DIR}/spells/effects/RemoveObstacle.cpp
${MAIN_LIB_DIR}/spells/effects/Sacrifice.cpp
${MAIN_LIB_DIR}/vstd/DateUtils.cpp
${MAIN_LIB_DIR}/vstd/StringUtils.cpp
${MAIN_LIB_DIR}/ArtifactUtils.cpp
${MAIN_LIB_DIR}/BasicTypes.cpp
${MAIN_LIB_DIR}/BattleFieldHandler.cpp
${MAIN_LIB_DIR}/CAndroidVMHelper.cpp
${MAIN_LIB_DIR}/CArtHandler.cpp
${MAIN_LIB_DIR}/CArtifactInstance.cpp
${MAIN_LIB_DIR}/CBonusTypeHandler.cpp
${MAIN_LIB_DIR}/CBuildingHandler.cpp
${MAIN_LIB_DIR}/CConfigHandler.cpp
${MAIN_LIB_DIR}/CConsoleHandler.cpp
${MAIN_LIB_DIR}/CCreatureHandler.cpp
${MAIN_LIB_DIR}/CCreatureSet.cpp
${MAIN_LIB_DIR}/CGameInfoCallback.cpp
${MAIN_LIB_DIR}/CGameInterface.cpp
${MAIN_LIB_DIR}/CGeneralTextHandler.cpp
${MAIN_LIB_DIR}/CHeroHandler.cpp
${MAIN_LIB_DIR}/CPlayerState.cpp
${MAIN_LIB_DIR}/CRandomGenerator.cpp
${MAIN_LIB_DIR}/CScriptingModule.cpp
${MAIN_LIB_DIR}/CSkillHandler.cpp
${MAIN_LIB_DIR}/CStack.cpp
${MAIN_LIB_DIR}/CThreadHelper.cpp
${MAIN_LIB_DIR}/CTownHandler.cpp
${MAIN_LIB_DIR}/GameSettings.cpp
${MAIN_LIB_DIR}/IGameCallback.cpp
${MAIN_LIB_DIR}/IHandlerBase.cpp
${MAIN_LIB_DIR}/JsonDetail.cpp
${MAIN_LIB_DIR}/JsonNode.cpp
${MAIN_LIB_DIR}/JsonRandom.cpp
${MAIN_LIB_DIR}/LoadProgress.cpp
${MAIN_LIB_DIR}/LogicalExpression.cpp
${MAIN_LIB_DIR}/MetaString.cpp
${MAIN_LIB_DIR}/ObstacleHandler.cpp
${MAIN_LIB_DIR}/StartInfo.cpp
${MAIN_LIB_DIR}/ResourceSet.cpp
${MAIN_LIB_DIR}/RiverHandler.cpp
${MAIN_LIB_DIR}/RoadHandler.cpp
${MAIN_LIB_DIR}/ScriptHandler.cpp
${MAIN_LIB_DIR}/TerrainHandler.cpp
${MAIN_LIB_DIR}/TextOperations.cpp
${MAIN_LIB_DIR}/TurnTimerInfo.cpp
${MAIN_LIB_DIR}/VCMIDirs.cpp
${MAIN_LIB_DIR}/VCMI_Lib.cpp
)
# Version.cpp is a generated file
if(ENABLE_GITVERSION)
list(APPEND lib_SRCS ${CMAKE_BINARY_DIR}/Version.cpp)
set_source_files_properties(${CMAKE_BINARY_DIR}/Version.cpp
PROPERTIES GENERATED TRUE
)
endif()
set(lib_HEADERS
${MAIN_LIB_DIR}/../include/vstd/CLoggerBase.h
${MAIN_LIB_DIR}/../Global.h
${MAIN_LIB_DIR}/../AUTHORS.h
${MAIN_LIB_DIR}/StdInc.h
${MAIN_LIB_DIR}/../include/vstd/ContainerUtils.h
${MAIN_LIB_DIR}/../include/vstd/RNG.h
${MAIN_LIB_DIR}/../include/vstd/DateUtils.h
${MAIN_LIB_DIR}/../include/vstd/StringUtils.h
${MAIN_LIB_DIR}/../include/vcmi/events/AdventureEvents.h
${MAIN_LIB_DIR}/../include/vcmi/events/ApplyDamage.h
${MAIN_LIB_DIR}/../include/vcmi/events/BattleEvents.h
${MAIN_LIB_DIR}/../include/vcmi/events/Event.h
${MAIN_LIB_DIR}/../include/vcmi/events/EventBus.h
${MAIN_LIB_DIR}/../include/vcmi/events/GameResumed.h
${MAIN_LIB_DIR}/../include/vcmi/events/GenericEvents.h
${MAIN_LIB_DIR}/../include/vcmi/events/ObjectVisitEnded.h
${MAIN_LIB_DIR}/../include/vcmi/events/ObjectVisitStarted.h
${MAIN_LIB_DIR}/../include/vcmi/events/PlayerGotTurn.h
${MAIN_LIB_DIR}/../include/vcmi/events/SubscriptionRegistry.h
${MAIN_LIB_DIR}/../include/vcmi/events/TurnStarted.h
${MAIN_LIB_DIR}/../include/vcmi/scripting/Service.h
${MAIN_LIB_DIR}/../include/vcmi/spells/Caster.h
${MAIN_LIB_DIR}/../include/vcmi/spells/Magic.h
${MAIN_LIB_DIR}/../include/vcmi/spells/Service.h
${MAIN_LIB_DIR}/../include/vcmi/spells/Spell.h
${MAIN_LIB_DIR}/../include/vcmi/Artifact.h
${MAIN_LIB_DIR}/../include/vcmi/ArtifactService.h
${MAIN_LIB_DIR}/../include/vcmi/Creature.h
${MAIN_LIB_DIR}/../include/vcmi/CreatureService.h
${MAIN_LIB_DIR}/../include/vcmi/Entity.h
${MAIN_LIB_DIR}/../include/vcmi/Environment.h
${MAIN_LIB_DIR}/../include/vcmi/Faction.h
${MAIN_LIB_DIR}/../include/vcmi/FactionService.h
${MAIN_LIB_DIR}/../include/vcmi/HeroClass.h
${MAIN_LIB_DIR}/../include/vcmi/HeroClassService.h
${MAIN_LIB_DIR}/../include/vcmi/HeroType.h
${MAIN_LIB_DIR}/../include/vcmi/HeroTypeService.h
${MAIN_LIB_DIR}/../include/vcmi/Metatype.h
${MAIN_LIB_DIR}/../include/vcmi/Player.h
${MAIN_LIB_DIR}/../include/vcmi/ServerCallback.h
${MAIN_LIB_DIR}/../include/vcmi/Services.h
${MAIN_LIB_DIR}/../include/vcmi/Skill.h
${MAIN_LIB_DIR}/../include/vcmi/SkillService.h
${MAIN_LIB_DIR}/../include/vcmi/Team.h
${MAIN_LIB_DIR}/battle/AccessibilityInfo.h
${MAIN_LIB_DIR}/battle/AutocombatPreferences.h
${MAIN_LIB_DIR}/battle/BattleAction.h
${MAIN_LIB_DIR}/battle/BattleAttackInfo.h
${MAIN_LIB_DIR}/battle/BattleHex.h
${MAIN_LIB_DIR}/battle/BattleInfo.h
${MAIN_LIB_DIR}/battle/BattleStateInfoForRetreat.h
${MAIN_LIB_DIR}/battle/BattleProxy.h
${MAIN_LIB_DIR}/battle/CBattleInfoCallback.h
${MAIN_LIB_DIR}/battle/CBattleInfoEssentials.h
${MAIN_LIB_DIR}/battle/CObstacleInstance.h
${MAIN_LIB_DIR}/battle/CPlayerBattleCallback.h
${MAIN_LIB_DIR}/battle/CUnitState.h
${MAIN_LIB_DIR}/battle/DamageCalculator.h
${MAIN_LIB_DIR}/battle/Destination.h
${MAIN_LIB_DIR}/battle/IBattleInfoCallback.h
${MAIN_LIB_DIR}/battle/IBattleState.h
${MAIN_LIB_DIR}/battle/IUnitInfo.h
${MAIN_LIB_DIR}/battle/PossiblePlayerBattleAction.h
${MAIN_LIB_DIR}/battle/ReachabilityInfo.h
${MAIN_LIB_DIR}/battle/SideInBattle.h
${MAIN_LIB_DIR}/battle/SiegeInfo.h
${MAIN_LIB_DIR}/battle/Unit.h
${MAIN_LIB_DIR}/bonuses/Bonus.h
${MAIN_LIB_DIR}/bonuses/BonusEnum.h
${MAIN_LIB_DIR}/bonuses/BonusList.h
${MAIN_LIB_DIR}/bonuses/BonusParams.h
${MAIN_LIB_DIR}/bonuses/BonusSelector.h
${MAIN_LIB_DIR}/bonuses/BonusCustomTypes.h
${MAIN_LIB_DIR}/bonuses/CBonusProxy.h
${MAIN_LIB_DIR}/bonuses/CBonusSystemNode.h
${MAIN_LIB_DIR}/bonuses/IBonusBearer.h
${MAIN_LIB_DIR}/bonuses/Limiters.h
${MAIN_LIB_DIR}/bonuses/Propagators.h
${MAIN_LIB_DIR}/bonuses/Updaters.h
${MAIN_LIB_DIR}/campaign/CampaignConstants.h
${MAIN_LIB_DIR}/campaign/CampaignHandler.h
${MAIN_LIB_DIR}/campaign/CampaignScenarioPrologEpilog.h
${MAIN_LIB_DIR}/campaign/CampaignState.h
${MAIN_LIB_DIR}/constants/EntityIdentifiers.h
${MAIN_LIB_DIR}/constants/Enumerations.h
${MAIN_LIB_DIR}/constants/IdentifierBase.h
${MAIN_LIB_DIR}/constants/VariantIdentifier.h
${MAIN_LIB_DIR}/constants/NumericConstants.h
${MAIN_LIB_DIR}/constants/StringConstants.h
${MAIN_LIB_DIR}/events/ApplyDamage.h
${MAIN_LIB_DIR}/events/GameResumed.h
${MAIN_LIB_DIR}/events/ObjectVisitEnded.h
${MAIN_LIB_DIR}/events/ObjectVisitStarted.h
${MAIN_LIB_DIR}/events/PlayerGotTurn.h
${MAIN_LIB_DIR}/events/TurnStarted.h
${MAIN_LIB_DIR}/filesystem/AdapterLoaders.h
${MAIN_LIB_DIR}/filesystem/CArchiveLoader.h
${MAIN_LIB_DIR}/filesystem/CBinaryReader.h
${MAIN_LIB_DIR}/filesystem/CCompressedStream.h
${MAIN_LIB_DIR}/filesystem/CFileInputStream.h
${MAIN_LIB_DIR}/filesystem/CFilesystemLoader.h
${MAIN_LIB_DIR}/filesystem/CInputOutputStream.h
${MAIN_LIB_DIR}/filesystem/CInputStream.h
${MAIN_LIB_DIR}/filesystem/CMemoryBuffer.h
${MAIN_LIB_DIR}/filesystem/CMemoryStream.h
${MAIN_LIB_DIR}/filesystem/COutputStream.h
${MAIN_LIB_DIR}/filesystem/CStream.h
${MAIN_LIB_DIR}/filesystem/CZipLoader.h
${MAIN_LIB_DIR}/filesystem/CZipSaver.h
${MAIN_LIB_DIR}/filesystem/FileInfo.h
${MAIN_LIB_DIR}/filesystem/Filesystem.h
${MAIN_LIB_DIR}/filesystem/ISimpleResourceLoader.h
${MAIN_LIB_DIR}/filesystem/MinizipExtensions.h
${MAIN_LIB_DIR}/filesystem/ResourcePath.h
${MAIN_LIB_DIR}/gameState/CGameState.h
${MAIN_LIB_DIR}/gameState/CGameStateCampaign.h
${MAIN_LIB_DIR}/gameState/EVictoryLossCheckResult.h
${MAIN_LIB_DIR}/gameState/InfoAboutArmy.h
${MAIN_LIB_DIR}/gameState/SThievesGuildInfo.h
${MAIN_LIB_DIR}/gameState/TavernHeroesPool.h
${MAIN_LIB_DIR}/gameState/TavernSlot.h
${MAIN_LIB_DIR}/gameState/QuestInfo.h
${MAIN_LIB_DIR}/logging/CBasicLogConfigurator.h
${MAIN_LIB_DIR}/logging/CLogger.h
${MAIN_LIB_DIR}/mapObjectConstructors/AObjectTypeHandler.h
${MAIN_LIB_DIR}/mapObjectConstructors/CBankInstanceConstructor.h
${MAIN_LIB_DIR}/mapObjectConstructors/CDefaultObjectTypeHandler.h
${MAIN_LIB_DIR}/mapObjectConstructors/CObjectClassesHandler.h
${MAIN_LIB_DIR}/mapObjectConstructors/CommonConstructors.h
${MAIN_LIB_DIR}/mapObjectConstructors/CRewardableConstructor.h
${MAIN_LIB_DIR}/mapObjectConstructors/DwellingInstanceConstructor.h
${MAIN_LIB_DIR}/mapObjectConstructors/HillFortInstanceConstructor.h
${MAIN_LIB_DIR}/mapObjectConstructors/IObjectInfo.h
${MAIN_LIB_DIR}/mapObjectConstructors/RandomMapInfo.h
${MAIN_LIB_DIR}/mapObjectConstructors/ShipyardInstanceConstructor.h
${MAIN_LIB_DIR}/mapObjectConstructors/SObjectSounds.h
${MAIN_LIB_DIR}/mapObjects/CArmedInstance.h
${MAIN_LIB_DIR}/mapObjects/CBank.h
${MAIN_LIB_DIR}/mapObjects/CGCreature.h
${MAIN_LIB_DIR}/mapObjects/CGDwelling.h
${MAIN_LIB_DIR}/mapObjects/CGHeroInstance.h
${MAIN_LIB_DIR}/mapObjects/CGMarket.h
${MAIN_LIB_DIR}/mapObjects/CGObjectInstance.h
${MAIN_LIB_DIR}/mapObjects/CGPandoraBox.h
${MAIN_LIB_DIR}/mapObjects/CGTownBuilding.h
${MAIN_LIB_DIR}/mapObjects/CGTownInstance.h
${MAIN_LIB_DIR}/mapObjects/CObjectHandler.h
${MAIN_LIB_DIR}/mapObjects/CQuest.h
${MAIN_LIB_DIR}/mapObjects/CRewardableObject.h
${MAIN_LIB_DIR}/mapObjects/IMarket.h
${MAIN_LIB_DIR}/mapObjects/IObjectInterface.h
${MAIN_LIB_DIR}/mapObjects/MapObjects.h
${MAIN_LIB_DIR}/mapObjects/MiscObjects.h
${MAIN_LIB_DIR}/mapObjects/ObjectTemplate.h
${MAIN_LIB_DIR}/mapping/CDrawRoadsOperation.h
${MAIN_LIB_DIR}/mapping/CMapDefines.h
${MAIN_LIB_DIR}/mapping/CMapEditManager.h
${MAIN_LIB_DIR}/mapping/CMapHeader.h
${MAIN_LIB_DIR}/mapping/CMap.h
${MAIN_LIB_DIR}/mapping/CMapInfo.h
${MAIN_LIB_DIR}/mapping/CMapOperation.h
${MAIN_LIB_DIR}/mapping/CMapService.h
${MAIN_LIB_DIR}/mapping/MapEditUtils.h
${MAIN_LIB_DIR}/mapping/MapIdentifiersH3M.h
${MAIN_LIB_DIR}/mapping/MapFeaturesH3M.h
${MAIN_LIB_DIR}/mapping/MapFormatH3M.h
${MAIN_LIB_DIR}/mapping/MapFormat.h
${MAIN_LIB_DIR}/mapping/MapReaderH3M.h
${MAIN_LIB_DIR}/mapping/MapFormatJson.h
${MAIN_LIB_DIR}/mapping/ObstacleProxy.h
${MAIN_LIB_DIR}/modding/ActiveModsInSaveList.h
${MAIN_LIB_DIR}/modding/CModHandler.h
${MAIN_LIB_DIR}/modding/CModInfo.h
${MAIN_LIB_DIR}/modding/CModVersion.h
${MAIN_LIB_DIR}/modding/ContentTypeHandler.h
${MAIN_LIB_DIR}/modding/IdentifierStorage.h
${MAIN_LIB_DIR}/modding/ModIncompatibility.h
${MAIN_LIB_DIR}/modding/ModScope.h
${MAIN_LIB_DIR}/modding/ModUtility.h
${MAIN_LIB_DIR}/modding/ModVerificationInfo.h
${MAIN_LIB_DIR}/network/NetworkConnection.h
${MAIN_LIB_DIR}/network/NetworkDefines.h
${MAIN_LIB_DIR}/network/NetworkHandler.h
${MAIN_LIB_DIR}/network/NetworkInterface.h
${MAIN_LIB_DIR}/network/NetworkServer.h
${MAIN_LIB_DIR}/networkPacks/ArtifactLocation.h
${MAIN_LIB_DIR}/networkPacks/BattleChanges.h
${MAIN_LIB_DIR}/networkPacks/Component.h
${MAIN_LIB_DIR}/networkPacks/EInfoWindowMode.h
${MAIN_LIB_DIR}/networkPacks/EntityChanges.h
${MAIN_LIB_DIR}/networkPacks/EOpenWindowMode.h
${MAIN_LIB_DIR}/networkPacks/NetPacksBase.h
${MAIN_LIB_DIR}/networkPacks/NetPackVisitor.h
${MAIN_LIB_DIR}/networkPacks/ObjProperty.h
${MAIN_LIB_DIR}/networkPacks/PacksForClient.h
${MAIN_LIB_DIR}/networkPacks/PacksForClientBattle.h
${MAIN_LIB_DIR}/networkPacks/PacksForLobby.h
${MAIN_LIB_DIR}/networkPacks/PacksForServer.h
${MAIN_LIB_DIR}/networkPacks/SetStackEffect.h
${MAIN_LIB_DIR}/networkPacks/StackLocation.h
${MAIN_LIB_DIR}/networkPacks/TradeItem.h
${MAIN_LIB_DIR}/pathfinder/INodeStorage.h
${MAIN_LIB_DIR}/pathfinder/CGPathNode.h
${MAIN_LIB_DIR}/pathfinder/CPathfinder.h
${MAIN_LIB_DIR}/pathfinder/NodeStorage.h
${MAIN_LIB_DIR}/pathfinder/PathfinderOptions.h
${MAIN_LIB_DIR}/pathfinder/PathfinderUtil.h
${MAIN_LIB_DIR}/pathfinder/PathfindingRules.h
${MAIN_LIB_DIR}/pathfinder/TurnInfo.h
${MAIN_LIB_DIR}/registerTypes/RegisterTypes.h
${MAIN_LIB_DIR}/registerTypes/RegisterTypesClientPacks.h
${MAIN_LIB_DIR}/registerTypes/RegisterTypesLobbyPacks.h
${MAIN_LIB_DIR}/registerTypes/RegisterTypesMapObjects.h
${MAIN_LIB_DIR}/registerTypes/RegisterTypesServerPacks.h
${MAIN_LIB_DIR}/rewardable/Configuration.h
${MAIN_LIB_DIR}/rewardable/Info.h
${MAIN_LIB_DIR}/rewardable/Interface.h
${MAIN_LIB_DIR}/rewardable/Limiter.h
${MAIN_LIB_DIR}/rewardable/Reward.h
${MAIN_LIB_DIR}/rmg/RmgArea.h
${MAIN_LIB_DIR}/rmg/RmgObject.h
${MAIN_LIB_DIR}/rmg/RmgPath.h
${MAIN_LIB_DIR}/rmg/CMapGenerator.h
${MAIN_LIB_DIR}/rmg/CMapGenOptions.h
${MAIN_LIB_DIR}/rmg/CRmgTemplate.h
${MAIN_LIB_DIR}/rmg/CRmgTemplateStorage.h
${MAIN_LIB_DIR}/rmg/CZonePlacer.h
${MAIN_LIB_DIR}/rmg/TileInfo.h
${MAIN_LIB_DIR}/rmg/Zone.h
${MAIN_LIB_DIR}/rmg/RmgMap.h
${MAIN_LIB_DIR}/rmg/float3.h
${MAIN_LIB_DIR}/rmg/Functions.h
${MAIN_LIB_DIR}/rmg/PenroseTiling.h
${MAIN_LIB_DIR}/rmg/modificators/Modificator.h
${MAIN_LIB_DIR}/rmg/modificators/ObjectManager.h
${MAIN_LIB_DIR}/rmg/modificators/ObjectDistributor.h
${MAIN_LIB_DIR}/rmg/modificators/RoadPlacer.h
${MAIN_LIB_DIR}/rmg/modificators/TreasurePlacer.h
${MAIN_LIB_DIR}/rmg/modificators/PrisonHeroPlacer.h
${MAIN_LIB_DIR}/rmg/modificators/QuestArtifactPlacer.h
${MAIN_LIB_DIR}/rmg/modificators/ConnectionsPlacer.h
${MAIN_LIB_DIR}/rmg/modificators/WaterAdopter.h
${MAIN_LIB_DIR}/rmg/modificators/MinePlacer.h
${MAIN_LIB_DIR}/rmg/modificators/TownPlacer.h
${MAIN_LIB_DIR}/rmg/modificators/WaterProxy.h
${MAIN_LIB_DIR}/rmg/modificators/WaterRoutes.h
${MAIN_LIB_DIR}/rmg/modificators/RockPlacer.h
${MAIN_LIB_DIR}/rmg/modificators/RockFiller.h
${MAIN_LIB_DIR}/rmg/modificators/ObstaclePlacer.h
${MAIN_LIB_DIR}/rmg/modificators/RiverPlacer.h
${MAIN_LIB_DIR}/rmg/modificators/TerrainPainter.h
${MAIN_LIB_DIR}/rmg/threadpool/BlockingQueue.h
${MAIN_LIB_DIR}/rmg/threadpool/ThreadPool.h
${MAIN_LIB_DIR}/rmg/threadpool/MapProxy.h
${MAIN_LIB_DIR}/serializer/BinaryDeserializer.h
${MAIN_LIB_DIR}/serializer/BinarySerializer.h
${MAIN_LIB_DIR}/serializer/CLoadFile.h
${MAIN_LIB_DIR}/serializer/CMemorySerializer.h
${MAIN_LIB_DIR}/serializer/Connection.h
${MAIN_LIB_DIR}/serializer/CSaveFile.h
${MAIN_LIB_DIR}/serializer/CSerializer.h
${MAIN_LIB_DIR}/serializer/CTypeList.h
${MAIN_LIB_DIR}/serializer/JsonDeserializer.h
${MAIN_LIB_DIR}/serializer/JsonSerializeFormat.h
${MAIN_LIB_DIR}/serializer/JsonSerializer.h
${MAIN_LIB_DIR}/serializer/JsonUpdater.h
${MAIN_LIB_DIR}/serializer/Cast.h
${MAIN_LIB_DIR}/serializer/ESerializationVersion.h
${MAIN_LIB_DIR}/spells/AbilityCaster.h
${MAIN_LIB_DIR}/spells/AdventureSpellMechanics.h
${MAIN_LIB_DIR}/spells/BattleSpellMechanics.h
${MAIN_LIB_DIR}/spells/BonusCaster.h
${MAIN_LIB_DIR}/spells/CSpellHandler.h
${MAIN_LIB_DIR}/spells/ExternalCaster.h
${MAIN_LIB_DIR}/spells/ISpellMechanics.h
${MAIN_LIB_DIR}/spells/ObstacleCasterProxy.h
${MAIN_LIB_DIR}/spells/Problem.h
${MAIN_LIB_DIR}/spells/ProxyCaster.h
${MAIN_LIB_DIR}/spells/TargetCondition.h
${MAIN_LIB_DIR}/spells/ViewSpellInt.h
${MAIN_LIB_DIR}/spells/effects/Catapult.h
${MAIN_LIB_DIR}/spells/effects/Clone.h
${MAIN_LIB_DIR}/spells/effects/Damage.h
${MAIN_LIB_DIR}/spells/effects/DemonSummon.h
${MAIN_LIB_DIR}/spells/effects/Dispel.h
${MAIN_LIB_DIR}/spells/effects/Effect.h
${MAIN_LIB_DIR}/spells/effects/Effects.h
${MAIN_LIB_DIR}/spells/effects/EffectsFwd.h
${MAIN_LIB_DIR}/spells/effects/Heal.h
${MAIN_LIB_DIR}/spells/effects/LocationEffect.h
${MAIN_LIB_DIR}/spells/effects/Obstacle.h
${MAIN_LIB_DIR}/spells/effects/Registry.h
${MAIN_LIB_DIR}/spells/effects/UnitEffect.h
${MAIN_LIB_DIR}/spells/effects/Summon.h
${MAIN_LIB_DIR}/spells/effects/Teleport.h
${MAIN_LIB_DIR}/spells/effects/Timed.h
${MAIN_LIB_DIR}/spells/effects/RemoveObstacle.h
${MAIN_LIB_DIR}/spells/effects/Sacrifice.h
${MAIN_LIB_DIR}/AI_Base.h
${MAIN_LIB_DIR}/ArtifactUtils.h
${MAIN_LIB_DIR}/BattleFieldHandler.h
${MAIN_LIB_DIR}/CAndroidVMHelper.h
${MAIN_LIB_DIR}/CArtHandler.h
${MAIN_LIB_DIR}/CArtifactInstance.h
${MAIN_LIB_DIR}/CBonusTypeHandler.h
${MAIN_LIB_DIR}/CBuildingHandler.h
${MAIN_LIB_DIR}/CConfigHandler.h
${MAIN_LIB_DIR}/CConsoleHandler.h
${MAIN_LIB_DIR}/CCreatureHandler.h
${MAIN_LIB_DIR}/CCreatureSet.h
${MAIN_LIB_DIR}/CGameInfoCallback.h
${MAIN_LIB_DIR}/CGameInterface.h
${MAIN_LIB_DIR}/CGeneralTextHandler.h
${MAIN_LIB_DIR}/CHeroHandler.h
${MAIN_LIB_DIR}/CondSh.h
${MAIN_LIB_DIR}/ConstTransitivePtr.h
${MAIN_LIB_DIR}/Color.h
${MAIN_LIB_DIR}/CPlayerState.h
${MAIN_LIB_DIR}/CRandomGenerator.h
${MAIN_LIB_DIR}/CScriptingModule.h
${MAIN_LIB_DIR}/CSkillHandler.h
${MAIN_LIB_DIR}/CSoundBase.h
${MAIN_LIB_DIR}/CStack.h
${MAIN_LIB_DIR}/CStopWatch.h
${MAIN_LIB_DIR}/CThreadHelper.h
${MAIN_LIB_DIR}/CTownHandler.h
${MAIN_LIB_DIR}/ExtraOptionsInfo.h
${MAIN_LIB_DIR}/FunctionList.h
${MAIN_LIB_DIR}/GameCallbackHolder.h
${MAIN_LIB_DIR}/GameConstants.h
${MAIN_LIB_DIR}/GameSettings.h
${MAIN_LIB_DIR}/IBonusTypeHandler.h
${MAIN_LIB_DIR}/IGameCallback.h
${MAIN_LIB_DIR}/IGameEventsReceiver.h
${MAIN_LIB_DIR}/IHandlerBase.h
${MAIN_LIB_DIR}/int3.h
${MAIN_LIB_DIR}/JsonDetail.h
${MAIN_LIB_DIR}/JsonNode.h
${MAIN_LIB_DIR}/JsonRandom.h
${MAIN_LIB_DIR}/Languages.h
${MAIN_LIB_DIR}/LoadProgress.h
${MAIN_LIB_DIR}/LogicalExpression.h
${MAIN_LIB_DIR}/MetaString.h
${MAIN_LIB_DIR}/ObstacleHandler.h
${MAIN_LIB_DIR}/Point.h
${MAIN_LIB_DIR}/Rect.h
${MAIN_LIB_DIR}/Rect.cpp
${MAIN_LIB_DIR}/ResourceSet.h
${MAIN_LIB_DIR}/RiverHandler.h
${MAIN_LIB_DIR}/RoadHandler.h
${MAIN_LIB_DIR}/ScriptHandler.h
${MAIN_LIB_DIR}/ScopeGuard.h
${MAIN_LIB_DIR}/StartInfo.h
${MAIN_LIB_DIR}/TerrainHandler.h
${MAIN_LIB_DIR}/TextOperations.h
${MAIN_LIB_DIR}/TurnTimerInfo.h
${MAIN_LIB_DIR}/UnlockGuard.h
${MAIN_LIB_DIR}/VCMIDirs.h
${MAIN_LIB_DIR}/vcmi_endian.h
${MAIN_LIB_DIR}/VCMI_Lib.h
)
assign_source_group(${lib_SRCS} ${lib_HEADERS})
add_library(${TARGET_NAME} ${LIBRARY_TYPE} ${lib_SRCS} ${lib_HEADERS})
set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_DEFINITIONS "VCMI_DLL=1")
target_link_libraries(${TARGET_NAME} PUBLIC
minizip::minizip ZLIB::ZLIB
${SYSTEM_LIBS} Boost::boost Boost::thread Boost::filesystem Boost::program_options Boost::locale Boost::date_time
)
if(APPLE_IOS)
target_link_libraries(${TARGET_NAME} PUBLIC iOS_utils)
endif()
target_include_directories(${TARGET_NAME}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC ${MAIN_LIB_DIR}/..
PUBLIC ${MAIN_LIB_DIR}/../include
PUBLIC ${MAIN_LIB_DIR}
)
if(WIN32)
set_target_properties(${TARGET_NAME}
PROPERTIES
OUTPUT_NAME "VCMI_lib"
PROJECT_LABEL "VCMI_lib"
)
endif()
vcmi_set_output_dir(${TARGET_NAME} "")
enable_pch(${TARGET_NAME})
# We want to deploy assets into build directory for easier debugging without install
if(COPY_CONFIG_ON_BUILD)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/config
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/Mods
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake_modules/create_link.cmake ${MAIN_LIB_DIR}/../config ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/config
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake_modules/create_link.cmake ${MAIN_LIB_DIR}/../Mods ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/Mods
)
endif()
# Update version before vcmi compiling
if(TARGET update_version)
add_dependencies(${TARGET_NAME} update_version)
endif()
if("${LIBRARY_TYPE}" STREQUAL SHARED)
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})
endif()
if(APPLE_IOS AND NOT USING_CONAN)
get_target_property(LINKED_LIBS ${TARGET_NAME} LINK_LIBRARIES)
foreach(LINKED_LIB IN LISTS LINKED_LIBS)
if(NOT TARGET ${LINKED_LIB})
if(LINKED_LIB MATCHES "\\${CMAKE_SHARED_LIBRARY_SUFFIX}$")
install(FILES ${LINKED_LIB} DESTINATION ${LIB_DIR})
endif()
continue()
endif()
get_target_property(LIB_TYPE ${LINKED_LIB} TYPE)
if(NOT LIB_TYPE STREQUAL "SHARED_LIBRARY")
continue()
endif()
get_target_property(_aliased ${LINKED_LIB} ALIASED_TARGET)
if(_aliased)
set(LINKED_LIB_REAL ${_aliased})
else()
set(LINKED_LIB_REAL ${LINKED_LIB})
endif()
get_target_property(_imported ${LINKED_LIB_REAL} IMPORTED)
if(_imported)
set(INSTALL_TYPE IMPORTED_RUNTIME_ARTIFACTS)
get_target_property(BOOST_DEPENDENCIES ${LINKED_LIB_REAL} INTERFACE_LINK_LIBRARIES)
foreach(BOOST_DEPENDENCY IN LISTS BOOST_DEPENDENCIES)
get_target_property(BOOST_DEPENDENCY_TYPE ${BOOST_DEPENDENCY} TYPE)
if(BOOST_DEPENDENCY_TYPE STREQUAL "SHARED_LIBRARY")
install(IMPORTED_RUNTIME_ARTIFACTS ${BOOST_DEPENDENCY} LIBRARY DESTINATION ${LIB_DIR})
endif()
endforeach()
else()
set(INSTALL_TYPE TARGETS)
endif()
install(${INSTALL_TYPE} ${LINKED_LIB_REAL} LIBRARY DESTINATION ${LIB_DIR})
endforeach()
endif()
endmacro()

View File

@ -135,7 +135,7 @@ if (NOT APPLE_IOS AND NOT ANDROID)
target_link_libraries(vcmilauncher SDL2::SDL2)
endif()
target_link_libraries(vcmilauncher ${VCMI_LIB_TARGET} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
target_link_libraries(vcmilauncher vcmi Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
target_include_directories(vcmilauncher
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -1,22 +1,775 @@
set(lib_SRCS
StdInc.cpp
battle/AccessibilityInfo.cpp
battle/BattleAction.cpp
battle/BattleAttackInfo.cpp
battle/BattleHex.cpp
battle/BattleInfo.cpp
battle/BattleProxy.cpp
battle/BattleStateInfoForRetreat.cpp
battle/CBattleInfoCallback.cpp
battle/CBattleInfoEssentials.cpp
battle/CObstacleInstance.cpp
battle/CPlayerBattleCallback.cpp
battle/CUnitState.cpp
battle/DamageCalculator.cpp
battle/Destination.cpp
battle/IBattleState.cpp
battle/ReachabilityInfo.cpp
battle/SideInBattle.cpp
battle/SiegeInfo.cpp
battle/Unit.cpp
bonuses/Bonus.cpp
bonuses/BonusEnum.cpp
bonuses/BonusList.cpp
bonuses/BonusParams.cpp
bonuses/BonusSelector.cpp
bonuses/BonusCustomTypes.cpp
bonuses/CBonusProxy.cpp
bonuses/CBonusSystemNode.cpp
bonuses/IBonusBearer.cpp
bonuses/Limiters.cpp
bonuses/Propagators.cpp
bonuses/Updaters.cpp
campaign/CampaignHandler.cpp
campaign/CampaignState.cpp
constants/EntityIdentifiers.cpp
events/ApplyDamage.cpp
events/GameResumed.cpp
events/ObjectVisitEnded.cpp
events/ObjectVisitStarted.cpp
events/PlayerGotTurn.cpp
events/TurnStarted.cpp
filesystem/AdapterLoaders.cpp
filesystem/CArchiveLoader.cpp
filesystem/CBinaryReader.cpp
filesystem/CCompressedStream.cpp
filesystem/CFileInputStream.cpp
filesystem/CFilesystemLoader.cpp
filesystem/CMemoryBuffer.cpp
filesystem/CMemoryStream.cpp
filesystem/CZipLoader.cpp
filesystem/CZipSaver.cpp
filesystem/FileInfo.cpp
filesystem/Filesystem.cpp
filesystem/MinizipExtensions.cpp
filesystem/ResourcePath.cpp
gameState/CGameState.cpp
gameState/CGameStateCampaign.cpp
gameState/InfoAboutArmy.cpp
gameState/TavernHeroesPool.cpp
logging/CBasicLogConfigurator.cpp
logging/CLogger.cpp
mapObjectConstructors/AObjectTypeHandler.cpp
mapObjectConstructors/CBankInstanceConstructor.cpp
mapObjectConstructors/CObjectClassesHandler.cpp
mapObjectConstructors/CommonConstructors.cpp
mapObjectConstructors/CRewardableConstructor.cpp
mapObjectConstructors/DwellingInstanceConstructor.cpp
mapObjectConstructors/HillFortInstanceConstructor.cpp
mapObjectConstructors/ShipyardInstanceConstructor.cpp
mapObjects/CArmedInstance.cpp
mapObjects/CBank.cpp
mapObjects/CGCreature.cpp
mapObjects/CGDwelling.cpp
mapObjects/CGHeroInstance.cpp
mapObjects/CGMarket.cpp
mapObjects/CGObjectInstance.cpp
mapObjects/CGPandoraBox.cpp
mapObjects/CGTownBuilding.cpp
mapObjects/CGTownInstance.cpp
mapObjects/CObjectHandler.cpp
mapObjects/CQuest.cpp
mapObjects/CRewardableObject.cpp
mapObjects/IMarket.cpp
mapObjects/IObjectInterface.cpp
mapObjects/MiscObjects.cpp
mapObjects/ObjectTemplate.cpp
mapping/CDrawRoadsOperation.cpp
mapping/CMap.cpp
mapping/CMapHeader.cpp
mapping/CMapEditManager.cpp
mapping/CMapInfo.cpp
mapping/CMapOperation.cpp
mapping/CMapService.cpp
mapping/MapEditUtils.cpp
mapping/MapIdentifiersH3M.cpp
mapping/MapFeaturesH3M.cpp
mapping/MapFormatH3M.cpp
mapping/MapReaderH3M.cpp
mapping/MapFormatJson.cpp
mapping/ObstacleProxy.cpp
modding/ActiveModsInSaveList.cpp
modding/CModHandler.cpp
modding/CModInfo.cpp
modding/CModVersion.cpp
modding/ContentTypeHandler.cpp
modding/IdentifierStorage.cpp
modding/ModUtility.cpp
network/NetworkConnection.cpp
network/NetworkHandler.cpp
network/NetworkServer.cpp
networkPacks/NetPacksLib.cpp
pathfinder/CGPathNode.cpp
pathfinder/CPathfinder.cpp
pathfinder/NodeStorage.cpp
pathfinder/PathfinderOptions.cpp
pathfinder/PathfindingRules.cpp
pathfinder/TurnInfo.cpp
rewardable/Configuration.cpp
rewardable/Info.cpp
rewardable/Interface.cpp
rewardable/Limiter.cpp
rewardable/Reward.cpp
rmg/RmgArea.cpp
rmg/RmgObject.cpp
rmg/RmgPath.cpp
rmg/CMapGenerator.cpp
rmg/CMapGenOptions.cpp
rmg/CRmgTemplate.cpp
rmg/CRmgTemplateStorage.cpp
rmg/CZonePlacer.cpp
rmg/TileInfo.cpp
rmg/Zone.cpp
rmg/Functions.cpp
rmg/RmgMap.cpp
rmg/PenroseTiling.cpp
rmg/modificators/Modificator.cpp
rmg/modificators/ObjectManager.cpp
rmg/modificators/ObjectDistributor.cpp
rmg/modificators/RoadPlacer.cpp
rmg/modificators/TreasurePlacer.cpp
rmg/modificators/PrisonHeroPlacer.cpp
rmg/modificators/QuestArtifactPlacer.cpp
rmg/modificators/ConnectionsPlacer.cpp
rmg/modificators/WaterAdopter.cpp
rmg/modificators/MinePlacer.cpp
rmg/modificators/TownPlacer.cpp
rmg/modificators/WaterProxy.cpp
rmg/modificators/WaterRoutes.cpp
rmg/modificators/RockPlacer.cpp
rmg/modificators/RockFiller.cpp
rmg/modificators/ObstaclePlacer.cpp
rmg/modificators/RiverPlacer.cpp
rmg/modificators/TerrainPainter.cpp
rmg/threadpool/MapProxy.cpp
serializer/BinaryDeserializer.cpp
serializer/BinarySerializer.cpp
serializer/CLoadFile.cpp
serializer/CMemorySerializer.cpp
serializer/Connection.cpp
serializer/CSaveFile.cpp
serializer/CSerializer.cpp
serializer/CTypeList.cpp
serializer/JsonDeserializer.cpp
serializer/JsonSerializeFormat.cpp
serializer/JsonSerializer.cpp
serializer/JsonUpdater.cpp
spells/AbilityCaster.cpp
spells/AdventureSpellMechanics.cpp
spells/BattleSpellMechanics.cpp
spells/BonusCaster.cpp
spells/CSpellHandler.cpp
spells/ExternalCaster.cpp
spells/ISpellMechanics.cpp
spells/ObstacleCasterProxy.cpp
spells/Problem.cpp
spells/ProxyCaster.cpp
spells/TargetCondition.cpp
spells/ViewSpellInt.cpp
spells/effects/Catapult.cpp
spells/effects/Clone.cpp
spells/effects/Damage.cpp
spells/effects/DemonSummon.cpp
spells/effects/Dispel.cpp
spells/effects/Effect.cpp
spells/effects/Effects.cpp
spells/effects/Heal.cpp
spells/effects/LocationEffect.cpp
spells/effects/Moat.cpp
spells/effects/Obstacle.cpp
spells/effects/Registry.cpp
spells/effects/UnitEffect.cpp
spells/effects/Summon.cpp
spells/effects/Teleport.cpp
spells/effects/Timed.cpp
spells/effects/RemoveObstacle.cpp
spells/effects/Sacrifice.cpp
vstd/DateUtils.cpp
vstd/StringUtils.cpp
ArtifactUtils.cpp
BasicTypes.cpp
BattleFieldHandler.cpp
CAndroidVMHelper.cpp
CArtHandler.cpp
CArtifactInstance.cpp
CBonusTypeHandler.cpp
CBuildingHandler.cpp
CConfigHandler.cpp
CConsoleHandler.cpp
CCreatureHandler.cpp
CCreatureSet.cpp
CGameInfoCallback.cpp
CGameInterface.cpp
CGeneralTextHandler.cpp
CHeroHandler.cpp
CPlayerState.cpp
CRandomGenerator.cpp
CScriptingModule.cpp
CSkillHandler.cpp
CStack.cpp
CThreadHelper.cpp
CTownHandler.cpp
GameSettings.cpp
IGameCallback.cpp
IHandlerBase.cpp
JsonDetail.cpp
JsonNode.cpp
JsonRandom.cpp
LoadProgress.cpp
LogicalExpression.cpp
MetaString.cpp
ObstacleHandler.cpp
StartInfo.cpp
ResourceSet.cpp
RiverHandler.cpp
RoadHandler.cpp
ScriptHandler.cpp
TerrainHandler.cpp
TextOperations.cpp
TurnTimerInfo.cpp
VCMIDirs.cpp
VCMI_Lib.cpp
)
# Version.cpp is a generated file
if(ENABLE_GITVERSION)
list(APPEND lib_SRCS ${CMAKE_BINARY_DIR}/Version.cpp)
set_source_files_properties(${CMAKE_BINARY_DIR}/Version.cpp
PROPERTIES GENERATED TRUE
)
endif()
set(lib_HEADERS
../include/vstd/CLoggerBase.h
../Global.h
../AUTHORS.h
StdInc.h
../include/vstd/ContainerUtils.h
../include/vstd/RNG.h
../include/vstd/DateUtils.h
../include/vstd/StringUtils.h
../include/vcmi/events/AdventureEvents.h
../include/vcmi/events/ApplyDamage.h
../include/vcmi/events/BattleEvents.h
../include/vcmi/events/Event.h
../include/vcmi/events/EventBus.h
../include/vcmi/events/GameResumed.h
../include/vcmi/events/GenericEvents.h
../include/vcmi/events/ObjectVisitEnded.h
../include/vcmi/events/ObjectVisitStarted.h
../include/vcmi/events/PlayerGotTurn.h
../include/vcmi/events/SubscriptionRegistry.h
../include/vcmi/events/TurnStarted.h
../include/vcmi/scripting/Service.h
../include/vcmi/spells/Caster.h
../include/vcmi/spells/Magic.h
../include/vcmi/spells/Service.h
../include/vcmi/spells/Spell.h
../include/vcmi/Artifact.h
../include/vcmi/ArtifactService.h
../include/vcmi/Creature.h
../include/vcmi/CreatureService.h
../include/vcmi/Entity.h
../include/vcmi/Environment.h
../include/vcmi/Faction.h
../include/vcmi/FactionService.h
../include/vcmi/HeroClass.h
../include/vcmi/HeroClassService.h
../include/vcmi/HeroType.h
../include/vcmi/HeroTypeService.h
../include/vcmi/Metatype.h
../include/vcmi/Player.h
../include/vcmi/ServerCallback.h
../include/vcmi/Services.h
../include/vcmi/Skill.h
../include/vcmi/SkillService.h
../include/vcmi/Team.h
battle/AccessibilityInfo.h
battle/AutocombatPreferences.h
battle/BattleAction.h
battle/BattleAttackInfo.h
battle/BattleHex.h
battle/BattleInfo.h
battle/BattleStateInfoForRetreat.h
battle/BattleProxy.h
battle/CBattleInfoCallback.h
battle/CBattleInfoEssentials.h
battle/CObstacleInstance.h
battle/CPlayerBattleCallback.h
battle/CUnitState.h
battle/DamageCalculator.h
battle/Destination.h
battle/IBattleInfoCallback.h
battle/IBattleState.h
battle/IUnitInfo.h
battle/PossiblePlayerBattleAction.h
battle/ReachabilityInfo.h
battle/SideInBattle.h
battle/SiegeInfo.h
battle/Unit.h
bonuses/Bonus.h
bonuses/BonusEnum.h
bonuses/BonusList.h
bonuses/BonusParams.h
bonuses/BonusSelector.h
bonuses/BonusCustomTypes.h
bonuses/CBonusProxy.h
bonuses/CBonusSystemNode.h
bonuses/IBonusBearer.h
bonuses/Limiters.h
bonuses/Propagators.h
bonuses/Updaters.h
campaign/CampaignConstants.h
campaign/CampaignHandler.h
campaign/CampaignScenarioPrologEpilog.h
campaign/CampaignState.h
constants/EntityIdentifiers.h
constants/Enumerations.h
constants/IdentifierBase.h
constants/VariantIdentifier.h
constants/NumericConstants.h
constants/StringConstants.h
events/ApplyDamage.h
events/GameResumed.h
events/ObjectVisitEnded.h
events/ObjectVisitStarted.h
events/PlayerGotTurn.h
events/TurnStarted.h
filesystem/AdapterLoaders.h
filesystem/CArchiveLoader.h
filesystem/CBinaryReader.h
filesystem/CCompressedStream.h
filesystem/CFileInputStream.h
filesystem/CFilesystemLoader.h
filesystem/CInputOutputStream.h
filesystem/CInputStream.h
filesystem/CMemoryBuffer.h
filesystem/CMemoryStream.h
filesystem/COutputStream.h
filesystem/CStream.h
filesystem/CZipLoader.h
filesystem/CZipSaver.h
filesystem/FileInfo.h
filesystem/Filesystem.h
filesystem/ISimpleResourceLoader.h
filesystem/MinizipExtensions.h
filesystem/ResourcePath.h
gameState/CGameState.h
gameState/CGameStateCampaign.h
gameState/EVictoryLossCheckResult.h
gameState/InfoAboutArmy.h
gameState/SThievesGuildInfo.h
gameState/TavernHeroesPool.h
gameState/TavernSlot.h
gameState/QuestInfo.h
logging/CBasicLogConfigurator.h
logging/CLogger.h
mapObjectConstructors/AObjectTypeHandler.h
mapObjectConstructors/CBankInstanceConstructor.h
mapObjectConstructors/CDefaultObjectTypeHandler.h
mapObjectConstructors/CObjectClassesHandler.h
mapObjectConstructors/CommonConstructors.h
mapObjectConstructors/CRewardableConstructor.h
mapObjectConstructors/DwellingInstanceConstructor.h
mapObjectConstructors/HillFortInstanceConstructor.h
mapObjectConstructors/IObjectInfo.h
mapObjectConstructors/RandomMapInfo.h
mapObjectConstructors/ShipyardInstanceConstructor.h
mapObjectConstructors/SObjectSounds.h
mapObjects/CArmedInstance.h
mapObjects/CBank.h
mapObjects/CGCreature.h
mapObjects/CGDwelling.h
mapObjects/CGHeroInstance.h
mapObjects/CGMarket.h
mapObjects/CGObjectInstance.h
mapObjects/CGPandoraBox.h
mapObjects/CGTownBuilding.h
mapObjects/CGTownInstance.h
mapObjects/CObjectHandler.h
mapObjects/CQuest.h
mapObjects/CRewardableObject.h
mapObjects/IMarket.h
mapObjects/IObjectInterface.h
mapObjects/MapObjects.h
mapObjects/MiscObjects.h
mapObjects/ObjectTemplate.h
mapping/CDrawRoadsOperation.h
mapping/CMapDefines.h
mapping/CMapEditManager.h
mapping/CMapHeader.h
mapping/CMap.h
mapping/CMapInfo.h
mapping/CMapOperation.h
mapping/CMapService.h
mapping/MapEditUtils.h
mapping/MapIdentifiersH3M.h
mapping/MapFeaturesH3M.h
mapping/MapFormatH3M.h
mapping/MapFormat.h
mapping/MapReaderH3M.h
mapping/MapFormatJson.h
mapping/ObstacleProxy.h
modding/ActiveModsInSaveList.h
modding/CModHandler.h
modding/CModInfo.h
modding/CModVersion.h
modding/ContentTypeHandler.h
modding/IdentifierStorage.h
modding/ModIncompatibility.h
modding/ModScope.h
modding/ModUtility.h
modding/ModVerificationInfo.h
network/NetworkConnection.h
network/NetworkDefines.h
network/NetworkHandler.h
network/NetworkInterface.h
network/NetworkServer.h
networkPacks/ArtifactLocation.h
networkPacks/BattleChanges.h
networkPacks/Component.h
networkPacks/EInfoWindowMode.h
networkPacks/EntityChanges.h
networkPacks/EOpenWindowMode.h
networkPacks/NetPacksBase.h
networkPacks/NetPackVisitor.h
networkPacks/ObjProperty.h
networkPacks/PacksForClient.h
networkPacks/PacksForClientBattle.h
networkPacks/PacksForLobby.h
networkPacks/PacksForServer.h
networkPacks/SetStackEffect.h
networkPacks/StackLocation.h
networkPacks/TradeItem.h
pathfinder/INodeStorage.h
pathfinder/CGPathNode.h
pathfinder/CPathfinder.h
pathfinder/NodeStorage.h
pathfinder/PathfinderOptions.h
pathfinder/PathfinderUtil.h
pathfinder/PathfindingRules.h
pathfinder/TurnInfo.h
registerTypes/RegisterTypes.h
registerTypes/RegisterTypesClientPacks.h
registerTypes/RegisterTypesLobbyPacks.h
registerTypes/RegisterTypesMapObjects.h
registerTypes/RegisterTypesServerPacks.h
rewardable/Configuration.h
rewardable/Info.h
rewardable/Interface.h
rewardable/Limiter.h
rewardable/Reward.h
rmg/RmgArea.h
rmg/RmgObject.h
rmg/RmgPath.h
rmg/CMapGenerator.h
rmg/CMapGenOptions.h
rmg/CRmgTemplate.h
rmg/CRmgTemplateStorage.h
rmg/CZonePlacer.h
rmg/TileInfo.h
rmg/Zone.h
rmg/RmgMap.h
rmg/float3.h
rmg/Functions.h
rmg/PenroseTiling.h
rmg/modificators/Modificator.h
rmg/modificators/ObjectManager.h
rmg/modificators/ObjectDistributor.h
rmg/modificators/RoadPlacer.h
rmg/modificators/TreasurePlacer.h
rmg/modificators/PrisonHeroPlacer.h
rmg/modificators/QuestArtifactPlacer.h
rmg/modificators/ConnectionsPlacer.h
rmg/modificators/WaterAdopter.h
rmg/modificators/MinePlacer.h
rmg/modificators/TownPlacer.h
rmg/modificators/WaterProxy.h
rmg/modificators/WaterRoutes.h
rmg/modificators/RockPlacer.h
rmg/modificators/RockFiller.h
rmg/modificators/ObstaclePlacer.h
rmg/modificators/RiverPlacer.h
rmg/modificators/TerrainPainter.h
rmg/threadpool/BlockingQueue.h
rmg/threadpool/ThreadPool.h
rmg/threadpool/MapProxy.h
serializer/BinaryDeserializer.h
serializer/BinarySerializer.h
serializer/CLoadFile.h
serializer/CMemorySerializer.h
serializer/Connection.h
serializer/CSaveFile.h
serializer/CSerializer.h
serializer/CTypeList.h
serializer/JsonDeserializer.h
serializer/JsonSerializeFormat.h
serializer/JsonSerializer.h
serializer/JsonUpdater.h
serializer/Cast.h
serializer/ESerializationVersion.h
spells/AbilityCaster.h
spells/AdventureSpellMechanics.h
spells/BattleSpellMechanics.h
spells/BonusCaster.h
spells/CSpellHandler.h
spells/ExternalCaster.h
spells/ISpellMechanics.h
spells/ObstacleCasterProxy.h
spells/Problem.h
spells/ProxyCaster.h
spells/TargetCondition.h
spells/ViewSpellInt.h
spells/effects/Catapult.h
spells/effects/Clone.h
spells/effects/Damage.h
spells/effects/DemonSummon.h
spells/effects/Dispel.h
spells/effects/Effect.h
spells/effects/Effects.h
spells/effects/EffectsFwd.h
spells/effects/Heal.h
spells/effects/LocationEffect.h
spells/effects/Obstacle.h
spells/effects/Registry.h
spells/effects/UnitEffect.h
spells/effects/Summon.h
spells/effects/Teleport.h
spells/effects/Timed.h
spells/effects/RemoveObstacle.h
spells/effects/Sacrifice.h
AI_Base.h
ArtifactUtils.h
BattleFieldHandler.h
CAndroidVMHelper.h
CArtHandler.h
CArtifactInstance.h
CBonusTypeHandler.h
CBuildingHandler.h
CConfigHandler.h
CConsoleHandler.h
CCreatureHandler.h
CCreatureSet.h
CGameInfoCallback.h
CGameInterface.h
CGeneralTextHandler.h
CHeroHandler.h
CondSh.h
ConstTransitivePtr.h
Color.h
CPlayerState.h
CRandomGenerator.h
CScriptingModule.h
CSkillHandler.h
CSoundBase.h
CStack.h
CStopWatch.h
CThreadHelper.h
CTownHandler.h
ExtraOptionsInfo.h
FunctionList.h
GameCallbackHolder.h
GameConstants.h
GameSettings.h
IBonusTypeHandler.h
IGameCallback.h
IGameEventsReceiver.h
IHandlerBase.h
int3.h
JsonDetail.h
JsonNode.h
JsonRandom.h
Languages.h
LoadProgress.h
LogicalExpression.h
MetaString.h
ObstacleHandler.h
Point.h
Rect.h
Rect.cpp
ResourceSet.h
RiverHandler.h
RoadHandler.h
ScriptHandler.h
ScopeGuard.h
StartInfo.h
TerrainHandler.h
TextOperations.h
TurnTimerInfo.h
UnlockGuard.h
VCMIDirs.h
vcmi_endian.h
VCMI_Lib.h
)
assign_source_group(${lib_SRCS} ${lib_HEADERS})
if(ENABLE_STATIC_LIBS)
add_main_lib(${VCMI_LIB_TARGET} STATIC)
target_compile_definitions(${VCMI_LIB_TARGET} PRIVATE STATIC_AI)
target_link_libraries(${VCMI_LIB_TARGET} PRIVATE
add_library(vcmi STATIC ${lib_SRCS} ${lib_HEADERS})
else()
add_library(vcmi SHARED ${lib_SRCS} ${lib_HEADERS})
endif()
set_target_properties(vcmi PROPERTIES COMPILE_DEFINITIONS "VCMI_DLL=1")
target_link_libraries(vcmi PUBLIC
minizip::minizip ZLIB::ZLIB
${SYSTEM_LIBS} Boost::boost Boost::thread Boost::filesystem Boost::program_options Boost::locale Boost::date_time
)
if(ENABLE_STATIC_LIBS)
target_compile_definitions(vcmi PRIVATE STATIC_AI)
target_link_libraries(vcmi PRIVATE
BattleAI
EmptyAI
StupidAI
VCAI
)
if(ENABLE_NULLKILLER_AI)
target_link_libraries(${VCMI_LIB_TARGET} PRIVATE Nullkiller)
target_link_libraries(vcmi PRIVATE Nullkiller)
endif()
else()
add_main_lib(${VCMI_LIB_TARGET} SHARED)
endif()
# no longer necessary, but might be useful to keep in future
# unfortunately at the moment tests do not support namespaced build, so enable only on some systems
if(APPLE_IOS OR ANDROID)
target_compile_definitions(${VCMI_LIB_TARGET} PUBLIC VCMI_LIB_NAMESPACE=VCMI)
target_compile_definitions(vcmi PUBLIC VCMI_LIB_NAMESPACE=VCMI)
endif()
if(APPLE_IOS)
target_link_libraries(vcmi PUBLIC iOS_utils)
endif()
target_include_directories(vcmi
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC ${CMAKE_SOURCE_DIR}
PUBLIC ${CMAKE_SOURCE_DIR}/include
)
if(WIN32)
set_target_properties(vcmi
PROPERTIES
OUTPUT_NAME "VCMI_lib"
PROJECT_LABEL "VCMI_lib"
)
endif()
vcmi_set_output_dir(vcmi "")
enable_pch(vcmi)
# We want to deploy assets into build directory for easier debugging without install
if(COPY_CONFIG_ON_BUILD)
add_custom_command(TARGET vcmi POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/config
COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/Mods
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake_modules/create_link.cmake ../config ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/config
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake_modules/create_link.cmake ../Mods ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/Mods
)
endif()
# Update version before vcmi compiling
if(TARGET update_version)
add_dependencies(vcmi update_version)
endif()
if(NOT ENABLE_STATIC_LIBS)
install(TARGETS vcmi RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})
endif()
if(APPLE_IOS AND NOT USING_CONAN)
get_target_property(LINKED_LIBS vcmi LINK_LIBRARIES)
foreach(LINKED_LIB IN LISTS LINKED_LIBS)
if(NOT TARGET ${LINKED_LIB})
if(LINKED_LIB MATCHES "\\${CMAKE_SHARED_LIBRARY_SUFFIX}$")
install(FILES ${LINKED_LIB} DESTINATION ${LIB_DIR})
endif()
continue()
endif()
get_target_property(LIB_TYPE ${LINKED_LIB} TYPE)
if(NOT LIB_TYPE STREQUAL "SHARED_LIBRARY")
continue()
endif()
get_target_property(_aliased ${LINKED_LIB} ALIASED_TARGET)
if(_aliased)
set(LINKED_LIB_REAL ${_aliased})
else()
set(LINKED_LIB_REAL ${LINKED_LIB})
endif()
get_target_property(_imported ${LINKED_LIB_REAL} IMPORTED)
if(_imported)
set(INSTALL_TYPE IMPORTED_RUNTIME_ARTIFACTS)
get_target_property(BOOST_DEPENDENCIES ${LINKED_LIB_REAL} INTERFACE_LINK_LIBRARIES)
foreach(BOOST_DEPENDENCY IN LISTS BOOST_DEPENDENCIES)
get_target_property(BOOST_DEPENDENCY_TYPE ${BOOST_DEPENDENCY} TYPE)
if(BOOST_DEPENDENCY_TYPE STREQUAL "SHARED_LIBRARY")
install(IMPORTED_RUNTIME_ARTIFACTS ${BOOST_DEPENDENCY} LIBRARY DESTINATION ${LIB_DIR})
endif()
endforeach()
else()
set(INSTALL_TYPE TARGETS)
endif()
install(${INSTALL_TYPE} ${LINKED_LIB_REAL} LIBRARY DESTINATION ${LIB_DIR})
endforeach()
endif()

View File

@ -178,7 +178,7 @@ if(APPLE)
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER vcmieditor)
endif()
target_link_libraries(vcmieditor ${VCMI_LIB_TARGET} Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
target_link_libraries(vcmieditor vcmi Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Network)
target_include_directories(vcmieditor
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -15,7 +15,7 @@ set(lib_HDRS
)
add_library(vcmiERM SHARED ${lib_SRCS} ${lib_HDRS})
target_link_libraries(vcmiERM Boost::boost ${VCMI_LIB_TARGET})
target_link_libraries(vcmiERM Boost::boost vcmi)
vcmi_set_output_dir(vcmiERM "scripting")
enable_pch(vcmiERM)

View File

@ -83,7 +83,7 @@ set(lib_HDRS
)
add_library(vcmiLua SHARED ${lib_SRCS} ${lib_HDRS})
target_link_libraries(vcmiLua Boost::boost luajit::luajit ${VCMI_LIB_TARGET})
target_link_libraries(vcmiLua Boost::boost luajit::luajit vcmi)
vcmi_set_output_dir(vcmiLua "scripting")
enable_pch(vcmiLua)