2013-01-06 22:30:12 +03:00
|
|
|
project(libvcmi)
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/lib)
|
|
|
|
include_directories(${Boost_INCLUDE_DIRS} ${SDL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
|
|
|
|
|
|
|
set(lib_SRCS
|
2014-02-05 23:25:36 +03:00
|
|
|
StdInc.cpp
|
2014-02-24 22:57:33 +03:00
|
|
|
|
2013-07-28 17:49:50 +03:00
|
|
|
filesystem/AdapterLoaders.cpp
|
|
|
|
filesystem/CCompressedStream.cpp
|
2013-04-07 13:48:07 +03:00
|
|
|
filesystem/CFilesystemLoader.cpp
|
2013-07-28 17:49:50 +03:00
|
|
|
filesystem/CArchiveLoader.cpp
|
2016-02-08 09:17:25 +02:00
|
|
|
filesystem/CMemoryBuffer.cpp
|
2013-07-28 17:49:50 +03:00
|
|
|
filesystem/CMemoryStream.cpp
|
|
|
|
filesystem/CBinaryReader.cpp
|
2013-04-07 13:48:07 +03:00
|
|
|
filesystem/CFileInputStream.cpp
|
2013-07-30 18:02:55 +03:00
|
|
|
filesystem/CZipLoader.cpp
|
2016-02-08 09:17:25 +02:00
|
|
|
filesystem/CZipSaver.cpp
|
2016-01-29 17:08:44 +02:00
|
|
|
filesystem/FileInfo.cpp
|
2013-07-28 17:49:50 +03:00
|
|
|
filesystem/Filesystem.cpp
|
2016-01-19 12:56:03 +02:00
|
|
|
filesystem/FileStream.cpp
|
2013-11-08 23:36:26 +03:00
|
|
|
filesystem/ResourceID.cpp
|
2016-02-08 09:17:25 +02:00
|
|
|
filesystem/MinizipExtensions.cpp
|
2013-07-28 17:49:50 +03:00
|
|
|
|
2014-06-05 20:26:50 +03:00
|
|
|
mapObjects/CArmedInstance.cpp
|
|
|
|
mapObjects/CBank.cpp
|
2014-06-05 19:52:14 +03:00
|
|
|
mapObjects/CGHeroInstance.cpp
|
|
|
|
mapObjects/CGMarket.cpp
|
|
|
|
mapObjects/CGPandoraBox.cpp
|
|
|
|
mapObjects/CGTownInstance.cpp
|
2014-06-05 14:19:47 +03:00
|
|
|
mapObjects/CObjectClassesHandler.cpp
|
|
|
|
mapObjects/CObjectHandler.cpp
|
2014-06-14 18:42:13 +03:00
|
|
|
mapObjects/CommonConstructors.cpp
|
2014-06-05 19:52:14 +03:00
|
|
|
mapObjects/CQuest.cpp
|
2014-06-05 14:19:47 +03:00
|
|
|
mapObjects/CRewardableConstructor.cpp
|
|
|
|
mapObjects/CRewardableObject.cpp
|
2014-06-22 13:39:40 +03:00
|
|
|
mapObjects/JsonRandom.cpp
|
2014-06-05 19:52:14 +03:00
|
|
|
mapObjects/MiscObjects.cpp
|
2014-06-05 14:19:47 +03:00
|
|
|
mapObjects/ObjectTemplate.cpp
|
|
|
|
|
2013-04-07 13:30:01 +03:00
|
|
|
logging/CBasicLogConfigurator.cpp
|
2013-04-11 18:58:01 +03:00
|
|
|
logging/CLogger.cpp
|
2013-07-28 17:49:50 +03:00
|
|
|
|
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
|
2013-12-31 02:09:58 +03:00
|
|
|
mapping/MapFormatJson.cpp
|
2013-07-28 17:49:50 +03:00
|
|
|
|
2013-04-07 13:48:07 +03:00
|
|
|
rmg/CMapGenerator.cpp
|
2013-08-17 15:46:48 +03:00
|
|
|
rmg/CMapGenOptions.cpp
|
|
|
|
rmg/CRmgTemplate.cpp
|
|
|
|
rmg/CRmgTemplateZone.cpp
|
|
|
|
rmg/CRmgTemplateStorage.cpp
|
|
|
|
rmg/CZoneGraphGenerator.cpp
|
|
|
|
rmg/CZonePlacer.cpp
|
2013-07-28 17:49:50 +03:00
|
|
|
|
2015-02-02 10:25:26 +02:00
|
|
|
spells/CSpellHandler.cpp
|
|
|
|
spells/ISpellMechanics.cpp
|
2015-02-26 16:15:17 +02:00
|
|
|
spells/AdventureSpellMechanics.cpp
|
|
|
|
spells/BattleSpellMechanics.cpp
|
|
|
|
spells/CreatureSpellMechanics.cpp
|
|
|
|
spells/CDefaultSpellMechanics.cpp
|
|
|
|
spells/ViewSpellInt.cpp
|
2015-02-02 10:25:26 +02:00
|
|
|
|
2013-01-06 22:30:12 +03:00
|
|
|
BattleAction.cpp
|
|
|
|
BattleHex.cpp
|
|
|
|
BattleState.cpp
|
|
|
|
CArtHandler.cpp
|
|
|
|
CBattleCallback.cpp
|
2013-03-06 21:49:56 +03:00
|
|
|
CBonusTypeHandler.cpp
|
2013-01-06 22:30:12 +03:00
|
|
|
CBuildingHandler.cpp
|
|
|
|
CConfigHandler.cpp
|
|
|
|
CConsoleHandler.cpp
|
|
|
|
CCreatureHandler.cpp
|
|
|
|
CCreatureSet.cpp
|
|
|
|
CGameInterface.cpp
|
|
|
|
CGeneralTextHandler.cpp
|
|
|
|
CHeroHandler.cpp
|
|
|
|
CModHandler.cpp
|
|
|
|
CObstacleInstance.cpp
|
2014-04-10 20:11:09 +03:00
|
|
|
CRandomGenerator.cpp
|
2015-02-02 10:25:26 +02:00
|
|
|
|
2013-01-06 22:30:12 +03:00
|
|
|
CThreadHelper.cpp
|
|
|
|
CTownHandler.cpp
|
2013-02-11 22:27:37 +03:00
|
|
|
GameConstants.cpp
|
2013-01-06 22:30:12 +03:00
|
|
|
HeroBonus.cpp
|
2013-10-26 22:33:34 +03:00
|
|
|
JsonDetail.cpp
|
2013-01-06 22:30:12 +03:00
|
|
|
JsonNode.cpp
|
2013-12-02 14:58:02 +03:00
|
|
|
LogicalExpression.cpp
|
2013-01-06 22:30:12 +03:00
|
|
|
ResourceSet.cpp
|
|
|
|
VCMI_Lib.cpp
|
2013-03-02 21:41:25 +03:00
|
|
|
VCMIDirs.cpp
|
2014-06-25 17:11:07 +03:00
|
|
|
IHandlerBase.cpp
|
2014-06-05 19:52:14 +03:00
|
|
|
|
|
|
|
IGameCallback.cpp
|
|
|
|
CGameInfoCallback.cpp
|
2015-10-27 02:34:47 +02:00
|
|
|
CPathfinder.cpp
|
2014-06-05 19:52:14 +03:00
|
|
|
CGameState.cpp
|
|
|
|
Connection.cpp
|
|
|
|
NetPacksLib.cpp
|
|
|
|
|
2016-02-13 09:47:40 +02:00
|
|
|
serializer/JsonSerializer.cpp
|
|
|
|
serializer/JsonDeserializer.cpp
|
|
|
|
serializer/JsonSerializeFormat.cpp
|
|
|
|
|
2014-06-05 19:52:14 +03:00
|
|
|
registerTypes/RegisterTypes.cpp
|
|
|
|
registerTypes/TypesClientPacks1.cpp
|
|
|
|
registerTypes/TypesClientPacks2.cpp
|
|
|
|
registerTypes/TypesMapObjects1.cpp
|
|
|
|
registerTypes/TypesMapObjects2.cpp
|
2015-02-02 10:25:26 +02:00
|
|
|
registerTypes/TypesMapObjects3.cpp
|
2014-06-05 19:52:14 +03:00
|
|
|
registerTypes/TypesPregamePacks.cpp
|
|
|
|
registerTypes/TypesServerPacks.cpp
|
2013-01-06 22:30:12 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
set(lib_HEADERS
|
2013-04-09 17:31:36 +03:00
|
|
|
../Global.h
|
2013-11-30 13:08:38 +03:00
|
|
|
|
2013-04-07 13:48:07 +03:00
|
|
|
filesystem/CInputStream.h
|
|
|
|
filesystem/ISimpleResourceLoader.h
|
2013-11-30 13:08:38 +03:00
|
|
|
|
2014-06-05 19:52:14 +03:00
|
|
|
mapObjects/MapObjects.h
|
2015-12-02 21:05:10 +02:00
|
|
|
mapping/CMapDefines.h
|
2014-06-05 19:52:14 +03:00
|
|
|
|
2014-06-05 23:51:24 +03:00
|
|
|
CSoundBase.h
|
2013-01-06 22:30:12 +03:00
|
|
|
AI_Base.h
|
|
|
|
CondSh.h
|
|
|
|
ConstTransitivePtr.h
|
2013-03-06 21:49:56 +03:00
|
|
|
CBonusTypeHandler.h
|
2013-01-06 22:30:12 +03:00
|
|
|
CScriptingModule.h
|
|
|
|
CStopWatch.h
|
2013-11-30 13:08:38 +03:00
|
|
|
FunctionList.h
|
2013-01-06 22:30:12 +03:00
|
|
|
GameConstants.h
|
|
|
|
StringConstants.h
|
|
|
|
IGameEventsReceiver.h
|
|
|
|
int3.h
|
2014-06-25 17:11:07 +03:00
|
|
|
CGameStateFwd.h
|
2015-12-02 21:39:53 +02:00
|
|
|
CPlayerState.h
|
2013-01-06 22:30:12 +03:00
|
|
|
Interprocess.h
|
|
|
|
NetPacks.h
|
2014-01-30 21:56:31 +03:00
|
|
|
NetPacksBase.h
|
2013-01-06 22:30:12 +03:00
|
|
|
StartInfo.h
|
|
|
|
UnlockGuard.h
|
|
|
|
VCMIDirs.h
|
|
|
|
vcmi_endian.h
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(vcmi SHARED ${lib_SRCS} ${lib_HEADERS})
|
2014-02-23 19:40:55 +03:00
|
|
|
set_target_properties(vcmi PROPERTIES XCODE_ATTRIBUTE_LD_DYLIB_INSTALL_NAME "@rpath/libvcmi.dylib")
|
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})
|
2013-01-06 22:30:12 +03:00
|
|
|
|
2014-07-11 01:09:00 +03:00
|
|
|
if(WIN32)
|
|
|
|
set_target_properties(vcmi PROPERTIES OUTPUT_NAME VCMI_lib)
|
|
|
|
endif()
|
|
|
|
|
2014-02-05 23:25:36 +03:00
|
|
|
set_target_properties(vcmi PROPERTIES ${PCH_PROPERTIES})
|
|
|
|
cotire(vcmi)
|
2014-02-01 16:37:26 +03:00
|
|
|
|
2013-01-06 22:30:12 +03:00
|
|
|
if (NOT APPLE) # Already inside vcmiclient bundle
|
2014-07-11 17:27:50 +03:00
|
|
|
install(TARGETS vcmi RUNTIME DESTINATION ${LIB_DIR} LIBRARY DESTINATION ${LIB_DIR})
|
2013-01-06 22:30:12 +03:00
|
|
|
endif()
|