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
|
2013-04-07 13:48:07 +03:00
|
|
|
filesystem/CFileInfo.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
|
2013-07-28 17:49:50 +03:00
|
|
|
filesystem/Filesystem.cpp
|
2013-11-08 23:36:26 +03:00
|
|
|
filesystem/ResourceID.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
|
|
|
|
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
|
|
|
|
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
|
2013-01-06 22:30:12 +03:00
|
|
|
CSpellHandler.cpp
|
|
|
|
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
|
|
|
|
CGameState.cpp
|
|
|
|
Connection.cpp
|
|
|
|
NetPacksLib.cpp
|
|
|
|
|
|
|
|
registerTypes/RegisterTypes.cpp
|
|
|
|
registerTypes/TypesClientPacks1.cpp
|
|
|
|
registerTypes/TypesClientPacks2.cpp
|
|
|
|
registerTypes/TypesMapObjects1.cpp
|
|
|
|
registerTypes/TypesMapObjects2.cpp
|
2014-06-23 09:24:49 +03: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
|
|
|
|
|
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
|
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")
|
2013-09-21 21:29:26 +03:00
|
|
|
target_link_libraries(vcmi minizip ${Boost_LIBRARIES} ${SDL_LIBRARY} ${ZLIB_LIBRARIES} ${RT_LIB} ${DL_LIB})
|
2013-01-06 22:30:12 +03:00
|
|
|
|
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-04-25 17:59:05 +03:00
|
|
|
install(TARGETS vcmi DESTINATION ${LIB_DIR})
|
2013-01-06 22:30:12 +03:00
|
|
|
endif()
|