1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
vcmi/lib/CMakeLists.txt

320 lines
7.9 KiB
CMake
Raw Normal View History

2016-08-12 08:38:26 +02:00
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/lib)
include_directories(${Boost_INCLUDE_DIRS} ${SDL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
set(lib_SRCS
StdInc.cpp
${CMAKE_BINARY_DIR}/Version.cpp
battle/AccessibilityInfo.cpp
battle/BattleAction.cpp
battle/BattleAttackInfo.cpp
battle/BattleHex.cpp
battle/BattleInfo.cpp
battle/CBattleInfoCallback.cpp
battle/CBattleInfoEssentials.cpp
battle/CCallbackBase.cpp
battle/CObstacleInstance.cpp
battle/CPlayerBattleCallback.cpp
battle/ReachabilityInfo.cpp
battle/SideInBattle.cpp
battle/SiegeInfo.cpp
filesystem/AdapterLoaders.cpp
filesystem/CArchiveLoader.cpp
filesystem/CBinaryReader.cpp
filesystem/CCompressedStream.cpp
filesystem/CFileInputStream.cpp
2013-04-07 13:48:07 +03:00
filesystem/CFilesystemLoader.cpp
filesystem/CMemoryBuffer.cpp
filesystem/CMemoryStream.cpp
filesystem/CZipLoader.cpp
filesystem/CZipSaver.cpp
2016-01-29 17:08:44 +02:00
filesystem/FileInfo.cpp
2016-01-19 12:56:03 +02:00
filesystem/FileStream.cpp
filesystem/Filesystem.cpp
filesystem/MinizipExtensions.cpp
filesystem/ResourceID.cpp
logging/CBasicLogConfigurator.cpp
logging/CLogger.cpp
mapObjects/CArmedInstance.cpp
mapObjects/CBank.cpp
mapObjects/CGHeroInstance.cpp
mapObjects/CGMarket.cpp
mapObjects/CGPandoraBox.cpp
mapObjects/CGTownInstance.cpp
mapObjects/CObjectClassesHandler.cpp
mapObjects/CObjectHandler.cpp
mapObjects/CommonConstructors.cpp
mapObjects/CQuest.cpp
mapObjects/CRewardableConstructor.cpp
mapObjects/CRewardableObject.cpp
mapObjects/JsonRandom.cpp
mapObjects/MiscObjects.cpp
mapObjects/ObjectTemplate.cpp
2013-04-07 13:48:07 +03:00
mapping/CCampaignHandler.cpp
2015-05-26 01:02:45 +02:00
mapping/CDrawRoadsOperation.cpp
2013-04-07 13:48:07 +03:00
mapping/CMap.cpp
mapping/CMapEditManager.cpp
mapping/CMapInfo.cpp
mapping/CMapService.cpp
mapping/MapFormatH3M.cpp
mapping/MapFormatJson.cpp
registerTypes/RegisterTypes.cpp
registerTypes/TypesClientPacks1.cpp
registerTypes/TypesClientPacks2.cpp
registerTypes/TypesMapObjects1.cpp
registerTypes/TypesMapObjects2.cpp
registerTypes/TypesMapObjects3.cpp
registerTypes/TypesPregamePacks.cpp
registerTypes/TypesServerPacks.cpp
2013-04-07 13:48:07 +03:00
rmg/CMapGenerator.cpp
rmg/CMapGenOptions.cpp
rmg/CRmgTemplate.cpp
rmg/CRmgTemplateStorage.cpp
rmg/CRmgTemplateZone.cpp
rmg/CZoneGraphGenerator.cpp
rmg/CZonePlacer.cpp
serializer/BinaryDeserializer.cpp
serializer/BinarySerializer.cpp
serializer/CLoadIntegrityValidator.cpp
serializer/CMemorySerializer.cpp
serializer/Connection.cpp
serializer/CSerializer.cpp
serializer/CTypeList.cpp
serializer/JsonDeserializer.cpp
serializer/JsonSerializeFormat.cpp
serializer/JsonSerializer.cpp
spells/AdventureSpellMechanics.cpp
spells/BattleSpellMechanics.cpp
spells/CDefaultSpellMechanics.cpp
spells/CreatureSpellMechanics.cpp
spells/CSpellHandler.cpp
spells/ISpellMechanics.cpp
spells/ViewSpellInt.cpp
CAndroidVMHelper.cpp
CArtHandler.cpp
CBonusTypeHandler.cpp
CBuildingHandler.cpp
CConfigHandler.cpp
CConsoleHandler.cpp
CCreatureHandler.cpp
CCreatureSet.cpp
CGameInfoCallback.cpp
CGameInterface.cpp
CGameState.cpp
CGeneralTextHandler.cpp
CHeroHandler.cpp
CModHandler.cpp
CPathfinder.cpp
CRandomGenerator.cpp
CStack.cpp
CThreadHelper.cpp
CTownHandler.cpp
2013-02-11 22:27:37 +03:00
GameConstants.cpp
HeroBonus.cpp
IGameCallback.cpp
IHandlerBase.cpp
JsonDetail.cpp
JsonNode.cpp
LogicalExpression.cpp
NetPacksLib.cpp
ResourceSet.cpp
VCMIDirs.cpp
VCMI_Lib.cpp
2017-07-04 21:07:24 +02:00
${VCMILIB_ADDITIONAL_SOURCES}
)
set(lib_HEADERS
StdInc.h
../Global.h
battle/AccessibilityInfo.h
battle/BattleAction.h
battle/BattleAttackInfo.h
battle/BattleHex.h
battle/BattleInfo.h
battle/CBattleInfoCallback.h
battle/CBattleInfoEssentials.h
battle/CCallbackBase.h
battle/CObstacleInstance.h
battle/CPlayerBattleCallback.h
battle/ReachabilityInfo.h
battle/SideInBattle.h
battle/SiegeInfo.h
filesystem/AdapterLoaders.h
filesystem/CArchiveLoader.h
filesystem/CBinaryReader.h
filesystem/CCompressedStream.h
filesystem/CFileInputStream.h
filesystem/CFilesystemLoader.h
filesystem/CInputOutputStream.h
2013-04-07 13:48:07 +03:00
filesystem/CInputStream.h
filesystem/CMemoryBuffer.h
filesystem/CMemoryStream.h
2017-03-10 18:39:11 +02:00
filesystem/COutputStream.h
filesystem/CStream.h
filesystem/CZipLoader.h
filesystem/CZipSaver.h
filesystem/FileInfo.h
filesystem/FileStream.h
filesystem/Filesystem.h
filesystem/ISimpleResourceLoader.h
filesystem/MinizipExtensions.h
filesystem/ResourceID.h
2017-03-10 18:39:11 +02:00
logging/CBasicLogConfigurator.h
logging/CLogger.h
mapObjects/CArmedInstance.h
mapObjects/CBank.h
mapObjects/CGHeroInstance.h
mapObjects/CGMarket.h
mapObjects/CGPandoraBox.h
mapObjects/CGTownInstance.h
mapObjects/CObjectClassesHandler.h
mapObjects/CObjectHandler.h
mapObjects/CommonConstructors.h
mapObjects/CQuest.h
mapObjects/CRewardableConstructor.h
mapObjects/CRewardableObject.h
mapObjects/JsonRandom.h
mapObjects/MapObjects.h
mapObjects/MiscObjects.h
mapObjects/ObjectTemplate.h
mapping/CCampaignHandler.h
mapping/CDrawRoadsOperation.h
mapping/CMapDefines.h
mapping/CMapEditManager.h
mapping/CMap.h
mapping/CMapInfo.h
mapping/CMapService.h
mapping/MapFormatH3M.h
mapping/MapFormatJson.h
registerTypes/RegisterTypes.h
rmg/CMapGenerator.h
rmg/CMapGenOptions.h
rmg/CRmgTemplate.h
rmg/CRmgTemplateStorage.h
rmg/CRmgTemplateZone.h
rmg/CZoneGraphGenerator.h
rmg/CZonePlacer.h
2017-03-10 18:39:11 +02:00
rmg/float3.h
serializer/BinaryDeserializer.h
serializer/BinarySerializer.h
serializer/CLoadIntegrityValidator.h
serializer/CMemorySerializer.h
serializer/Connection.h
serializer/CSerializer.h
serializer/CTypeList.h
serializer/JsonDeserializer.h
serializer/JsonSerializeFormat.h
serializer/JsonSerializer.h
spells/AdventureSpellMechanics.h
spells/BattleSpellMechanics.h
spells/CDefaultSpellMechanics.h
spells/CreatureSpellMechanics.h
spells/CSpellHandler.h
spells/ISpellMechanics.h
2017-03-10 18:39:11 +02:00
spells/Magic.h
spells/SpellMechanics.h
spells/ViewSpellInt.h
AI_Base.h
CAndroidVMHelper.h
CArtHandler.h
CBonusTypeHandler.h
CBuildingHandler.h
CConfigHandler.h
CConsoleHandler.h
CCreatureHandler.h
CCreatureSet.h
CGameInfoCallback.h
CGameInterface.h
CGameStateFwd.h
CGameState.h
CGeneralTextHandler.h
CHeroHandler.h
CModHandler.h
CondSh.h
ConstTransitivePtr.h
CPathfinder.h
CPlayerState.h
CRandomGenerator.h
CScriptingModule.h
CSoundBase.h
CStack.h
CStopWatch.h
CThreadHelper.h
CTownHandler.h
FunctionList.h
GameConstants.h
HeroBonus.h
2017-03-10 18:39:11 +02:00
IBonusTypeHandler.h
IGameCallback.h
IGameEventsReceiver.h
IHandlerBase.h
int3.h
Interprocess.h
JsonDetail.h
JsonNode.h
LogicalExpression.h
NetPacksBase.h
NetPacks.h
ResourceSet.h
2017-03-10 18:39:11 +02:00
ScopeGuard.h
StartInfo.h
StringConstants.h
UnlockGuard.h
VCMIDirs.h
vcmi_endian.h
VCMI_Lib.h
)
assign_source_group(${lib_SRCS} ${lib_HEADERS})
add_library(vcmi SHARED ${lib_SRCS} ${lib_HEADERS})
2014-07-08 01:50:44 +03:00
set_target_properties(vcmi PROPERTIES COMPILE_DEFINITIONS "VCMI_DLL=1")
2014-09-02 16:20:34 +03:00
target_link_libraries(vcmi ${MINIZIP_LIBRARIES} ${Boost_LIBRARIES} ${SDL_LIBRARY} ${ZLIB_LIBRARIES} ${SYSTEM_LIBS})
if(WIN32)
set_target_properties(vcmi
PROPERTIES
OUTPUT_NAME "VCMI_lib"
PROJECT_LABEL "VCMI_lib"
)
endif()
if(ANDROID)
return()
endif()
vcmi_set_output_dir(vcmi "")
set_target_properties(vcmi PROPERTIES ${PCH_PROPERTIES})
cotire(vcmi)
# We want to deploy assets into build directory for easier debugging without install
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} -E copy_directory ${CMAKE_SOURCE_DIR}/config ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/config
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Mods ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/Mods
)
install(TARGETS vcmi RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})