1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

CMake: update all CMakeLists to include actual sources and headers

This make it easier to use project with newer CMake and Qt Creator.
I decided against using GLOB since we don't rename files that much.
This commit is contained in:
Arseniy Shestakov 2017-06-29 02:03:37 +03:00
parent 2ce02202c1
commit fb19a3a068
10 changed files with 349 additions and 131 deletions

View File

@ -5,20 +5,33 @@ include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_D
set(battleAI_SRCS set(battleAI_SRCS
StdInc.cpp StdInc.cpp
BattleAI.cpp
StackWithBonuses.cpp
EnemyInfo.cpp
AttackPossibility.cpp AttackPossibility.cpp
PotentialTargets.cpp BattleAI.cpp
main.cpp
common.cpp common.cpp
EnemyInfo.cpp
main.cpp
PotentialTargets.cpp
StackWithBonuses.cpp
ThreatMap.cpp ThreatMap.cpp
) )
set(battleAI_HEADERS
StdInc.h
AttackPossibility.h
BattleAI.h
common.h
EnemyInfo.h
PotentialTargets.h
StackWithBonuses.h
ThreatMap.h
)
if (ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list if (ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list
return() return()
endif() endif()
add_library(BattleAI SHARED ${battleAI_SRCS}) add_library(BattleAI SHARED ${battleAI_SRCS} ${battleAI_HEADERS})
target_link_libraries(BattleAI vcmi) target_link_libraries(BattleAI vcmi)
set_target_properties(BattleAI PROPERTIES ${PCH_PROPERTIES}) set_target_properties(BattleAI PROPERTIES ${PCH_PROPERTIES})

View File

@ -4,11 +4,19 @@ cmake_minimum_required(VERSION 2.6)
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib) include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
set(emptyAI_SRCS set(emptyAI_SRCS
CEmptyAI.cpp StdInc.cpp
exp_funcs.cpp
CEmptyAI.cpp
exp_funcs.cpp
) )
add_library(EmptyAI SHARED ${emptyAI_SRCS}) set(emptyAI_HEADERS
StdInc.h
CEmptyAI.h
)
add_library(EmptyAI SHARED ${emptyAI_SRCS} ${emptyAI_HEADERS})
target_link_libraries(EmptyAI vcmi) target_link_libraries(EmptyAI vcmi)
if (NOT APPLE) # Already inside vcmiclient bundle if (NOT APPLE) # Already inside vcmiclient bundle

View File

@ -5,11 +5,18 @@ include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_D
set(stupidAI_SRCS set(stupidAI_SRCS
StdInc.cpp StdInc.cpp
StupidAI.cpp
main.cpp main.cpp
StupidAI.cpp
) )
add_library(StupidAI SHARED ${stupidAI_SRCS}) set(stupidAI_HEADERS
StdInc.h
StupidAI.h
)
add_library(StupidAI SHARED ${stupidAI_SRCS} ${stupidAI_HEADERS})
target_link_libraries(StupidAI vcmi) target_link_libraries(StupidAI vcmi)
set_target_properties(StupidAI PROPERTIES ${PCH_PROPERTIES}) set_target_properties(StupidAI PROPERTIES ${PCH_PROPERTIES})

View File

@ -9,19 +9,29 @@ endif()
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib) include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
set(VCAI_SRCS set(VCAI_SRCS
StdInc.cpp StdInc.cpp
VCAI.cpp
Goals.cpp AIUtility.cpp
AIUtility.cpp Fuzzy.cpp
main.cpp Goals.cpp
Fuzzy.cpp main.cpp
VCAI.cpp
)
set(VCAI_HEADERS
StdInc.h
AIUtility.h
Fuzzy.h
Goals.h
VCAI.h
) )
if (ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list if (ANDROID) # android compiles ai libs into main lib directly, so we skip this library and just reuse sources list
return() return()
endif() endif()
add_library(VCAI SHARED ${VCAI_SRCS}) add_library(VCAI SHARED ${VCAI_SRCS} ${VCAI_HEADERS})
if (FL_FOUND) if (FL_FOUND)
target_link_libraries(VCAI ${FL_LIBRARIES} vcmi) target_link_libraries(VCAI ${FL_LIBRARIES} vcmi)
else() else()

View File

@ -9,9 +9,9 @@ set(client_SRCS
StdInc.cpp StdInc.cpp
../CCallback.cpp ../CCallback.cpp
battle/CBattleInterface.cpp
battle/CBattleAnimations.cpp battle/CBattleAnimations.cpp
battle/CBattleInterfaceClasses.cpp battle/CBattleInterfaceClasses.cpp
battle/CBattleInterface.cpp
battle/CCreatureAnimation.cpp battle/CCreatureAnimation.cpp
gui/CAnimation.cpp gui/CAnimation.cpp
@ -40,9 +40,9 @@ set(client_SRCS
windows/CQuestLog.cpp windows/CQuestLog.cpp
windows/CSpellWindow.cpp windows/CSpellWindow.cpp
windows/CTradeWindow.cpp windows/CTradeWindow.cpp
windows/CWindowObject windows/CWindowObject.cpp
windows/InfoWindows.cpp
windows/GUIClasses.cpp windows/GUIClasses.cpp
windows/InfoWindows.cpp
CBitmapHandler.cpp CBitmapHandler.cpp
CDefHandler.cpp CDefHandler.cpp
@ -61,8 +61,59 @@ set(client_SRCS
) )
set(client_HEADERS set(client_HEADERS
StdInc.h
battle/CBattleAnimations.h
battle/CBattleInterfaceClasses.h
battle/CBattleInterface.h
battle/CCreatureAnimation.h
gui/CAnimation.h
gui/CCursorHandler.h
gui/CGuiHandler.h
gui/CIntObject.h
gui/Fonts.h
gui/Geometries.h
gui/SDL_Compat.h
gui/SDL_Extensions.h
gui/SDL_Pixels.h gui/SDL_Pixels.h
gui/SDL_Compat.h
widgets/AdventureMapClasses.h
widgets/Buttons.h
widgets/CArtifactHolder.h
widgets/CComponent.h
widgets/CGarrisonInt.h
widgets/Images.h
widgets/MiscWidgets.h
widgets/ObjectLists.h
widgets/TextControls.h
windows/CAdvmapInterface.h
windows/CCastleInterface.h
windows/CCreatureWindow.h
windows/CHeroWindow.h
windows/CKingdomInterface.h
windows/CQuestLog.h
windows/CSpellWindow.h
windows/CTradeWindow.h
windows/CWindowObject.h
windows/GUIClasses.h
windows/InfoWindows.h
CBitmapHandler.h
CDefHandler.h
CGameInfo.h
Client.h
CMessage.h
CMT.h
CMusicHandler.h
CPlayerInterface.h
CPreGame.h
CVideoHandler.h
Graphics.h
mapHandler.h
resource.h
SDLMain.h
SDLRWwrapper.h
) )
if(ANDROID) # android needs client/server to be libraries, not executables, so we can't reuse the build part of this script if(ANDROID) # android needs client/server to be libraries, not executables, so we can't reuse the build part of this script
@ -121,9 +172,9 @@ if(APPLE)
add_custom_command(TARGET vcmiclient POST_BUILD COMMAND ${MakeVCMIBundle}) add_custom_command(TARGET vcmiclient POST_BUILD COMMAND ${MakeVCMIBundle})
elseif(WIN32) elseif(WIN32)
add_executable(vcmiclient ${client_SRCS} VCMI_client.rc) add_executable(vcmiclient ${client_SRCS} ${client_HEADERS} VCMI_client.rc)
else() else()
add_executable(vcmiclient ${client_SRCS}) add_executable(vcmiclient ${client_SRCS} ${client_HEADERS})
endif() endif()
if(WIN32) if(WIN32)

View File

@ -9,6 +9,7 @@
*/ */
#include "CAndroidVMHelper.h" #include "CAndroidVMHelper.h"
#ifdef VCMI_ANDROID
static JavaVM * vmCache = nullptr; static JavaVM * vmCache = nullptr;
/// cached java classloader so that we can find our classes from other threads /// cached java classloader so that we can find our classes from other threads
@ -103,3 +104,4 @@ extern "C" JNIEXPORT void JNICALL Java_eu_vcmi_vcmi_NativeMethods_initClassloade
vcmiClassLoader = (jclass) env->NewGlobalRef(env->CallObjectMethod(anyVCMIClass, getClassLoaderMethod)); vcmiClassLoader = (jclass) env->NewGlobalRef(env->CallObjectMethod(anyVCMIClass, getClassLoaderMethod));
vcmiFindClassMethod = env->GetMethodID(classLoaderClass, "findClass", "(Ljava/lang/String;)Ljava/lang/Class;"); vcmiFindClassMethod = env->GetMethodID(classLoaderClass, "findClass", "(Ljava/lang/String;)Ljava/lang/Class;");
} }
#endif

View File

@ -9,6 +9,7 @@
*/ */
#pragma once #pragma once
#ifdef VCMI_ANDROID
#include <jni.h> #include <jni.h>
#include <string> #include <string>
@ -39,3 +40,5 @@ public:
static constexpr const char * NATIVE_METHODS_DEFAULT_CLASS = "eu/vcmi/vcmi/NativeMethods"; static constexpr const char * NATIVE_METHODS_DEFAULT_CLASS = "eu/vcmi/vcmi/NativeMethods";
}; };
#endif

View File

@ -8,21 +8,38 @@ set(lib_SRCS
StdInc.cpp StdInc.cpp
${CMAKE_BINARY_DIR}/Version.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/AdapterLoaders.cpp
filesystem/CCompressedStream.cpp
filesystem/CFilesystemLoader.cpp
filesystem/CArchiveLoader.cpp filesystem/CArchiveLoader.cpp
filesystem/CBinaryReader.cpp
filesystem/CCompressedStream.cpp
filesystem/CFileInputStream.cpp
filesystem/CFilesystemLoader.cpp
filesystem/CMemoryBuffer.cpp filesystem/CMemoryBuffer.cpp
filesystem/CMemoryStream.cpp filesystem/CMemoryStream.cpp
filesystem/CBinaryReader.cpp
filesystem/CFileInputStream.cpp
filesystem/CZipLoader.cpp filesystem/CZipLoader.cpp
filesystem/CZipSaver.cpp filesystem/CZipSaver.cpp
filesystem/FileInfo.cpp filesystem/FileInfo.cpp
filesystem/Filesystem.cpp
filesystem/FileStream.cpp filesystem/FileStream.cpp
filesystem/ResourceID.cpp filesystem/Filesystem.cpp
filesystem/MinizipExtensions.cpp filesystem/MinizipExtensions.cpp
filesystem/ResourceID.cpp
logging/CBasicLogConfigurator.cpp
logging/CLogger.cpp
mapObjects/CArmedInstance.cpp mapObjects/CArmedInstance.cpp
mapObjects/CBank.cpp mapObjects/CBank.cpp
@ -40,9 +57,6 @@ set(lib_SRCS
mapObjects/MiscObjects.cpp mapObjects/MiscObjects.cpp
mapObjects/ObjectTemplate.cpp mapObjects/ObjectTemplate.cpp
logging/CBasicLogConfigurator.cpp
logging/CLogger.cpp
mapping/CCampaignHandler.cpp mapping/CCampaignHandler.cpp
mapping/CDrawRoadsOperation.cpp mapping/CDrawRoadsOperation.cpp
mapping/CMap.cpp mapping/CMap.cpp
@ -52,79 +66,6 @@ set(lib_SRCS
mapping/MapFormatH3M.cpp mapping/MapFormatH3M.cpp
mapping/MapFormatJson.cpp mapping/MapFormatJson.cpp
rmg/CMapGenerator.cpp
rmg/CMapGenOptions.cpp
rmg/CRmgTemplate.cpp
rmg/CRmgTemplateZone.cpp
rmg/CRmgTemplateStorage.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
spells/CSpellHandler.cpp
spells/ISpellMechanics.cpp
spells/AdventureSpellMechanics.cpp
spells/BattleSpellMechanics.cpp
spells/CreatureSpellMechanics.cpp
spells/CDefaultSpellMechanics.cpp
spells/ViewSpellInt.cpp
battle/BattleAction.cpp
battle/BattleHex.cpp
battle/BattleInfo.cpp
battle/AccessibilityInfo.cpp
battle/BattleAttackInfo.cpp
battle/CBattleInfoCallback.cpp
battle/CBattleInfoEssentials.cpp
battle/CCallbackBase.cpp
battle/CPlayerBattleCallback.cpp
battle/ReachabilityInfo.cpp
SiegeInfo.cpp
SideInBattle.cpp
CStack.cpp
CArtHandler.cpp
CBonusTypeHandler.cpp
CBuildingHandler.cpp
CConfigHandler.cpp
CConsoleHandler.cpp
CCreatureHandler.cpp
CCreatureSet.cpp
CGameInterface.cpp
CGeneralTextHandler.cpp
CHeroHandler.cpp
CModHandler.cpp
battle/CObstacleInstance.cpp
CRandomGenerator.cpp
CThreadHelper.cpp
CTownHandler.cpp
GameConstants.cpp
HeroBonus.cpp
JsonDetail.cpp
JsonNode.cpp
LogicalExpression.cpp
ResourceSet.cpp
VCMI_Lib.cpp
VCMIDirs.cpp
IHandlerBase.cpp
IGameCallback.cpp
CGameInfoCallback.cpp
CPathfinder.cpp
CGameState.cpp
NetPacksLib.cpp
serializer/JsonSerializer.cpp
serializer/JsonDeserializer.cpp
serializer/JsonSerializeFormat.cpp
registerTypes/RegisterTypes.cpp registerTypes/RegisterTypes.cpp
registerTypes/TypesClientPacks1.cpp registerTypes/TypesClientPacks1.cpp
registerTypes/TypesClientPacks2.cpp registerTypes/TypesClientPacks2.cpp
@ -133,50 +74,216 @@ set(lib_SRCS
registerTypes/TypesMapObjects3.cpp registerTypes/TypesMapObjects3.cpp
registerTypes/TypesPregamePacks.cpp registerTypes/TypesPregamePacks.cpp
registerTypes/TypesServerPacks.cpp registerTypes/TypesServerPacks.cpp
${VCMILIB_ADDITIONAL_SOURCES} 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
GameConstants.cpp
HeroBonus.cpp
IGameCallback.cpp
IHandlerBase.cpp
JsonDetail.cpp
JsonNode.cpp
LogicalExpression.cpp
NetPacksLib.cpp
ResourceSet.cpp
VCMIDirs.cpp
VCMI_Lib.cpp
) )
set(lib_HEADERS set(lib_HEADERS
StdInc.h
../Global.h ../Global.h
filesystem/CInputStream.h battle/AccessibilityInfo.h
filesystem/ISimpleResourceLoader.h battle/BattleAction.h
filesystem/CStream.h battle/BattleAttackInfo.h
filesystem/COutputStream.h battle/BattleHex.h
filesystem/CInputOutputStream.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
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/FileStream.h
filesystem/Filesystem.h
filesystem/ISimpleResourceLoader.h
filesystem/MinizipExtensions.h
filesystem/ResourceID.h
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
rmg/float3.h 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
spells/Magic.h spells/Magic.h
spells/SpellMechanics.h spells/SpellMechanics.h
spells/ViewSpellInt.h
mapObjects/MapObjects.h
mapping/CMapDefines.h
CSoundBase.h
AI_Base.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 CondSh.h
ConstTransitivePtr.h ConstTransitivePtr.h
CBonusTypeHandler.h CPathfinder.h
CPlayerState.h
CRandomGenerator.h
CScriptingModule.h CScriptingModule.h
CSoundBase.h
CStack.h
CStopWatch.h CStopWatch.h
CThreadHelper.h
CTownHandler.h
FunctionList.h FunctionList.h
GameConstants.h GameConstants.h
HeroBonus.h
IBonusTypeHandler.h IBonusTypeHandler.h
StringConstants.h IGameCallback.h
IGameEventsReceiver.h IGameEventsReceiver.h
IHandlerBase.h
int3.h int3.h
CGameStateFwd.h
CPlayerState.h
Interprocess.h Interprocess.h
NetPacks.h JsonDetail.h
JsonNode.h
LogicalExpression.h
NetPacksBase.h NetPacksBase.h
NetPacks.h
ResourceSet.h
ScopeGuard.h ScopeGuard.h
StartInfo.h StartInfo.h
StringConstants.h
UnlockGuard.h UnlockGuard.h
VCMIDirs.h VCMIDirs.h
vcmi_endian.h vcmi_endian.h
VCMI_Lib.h
) )
add_library(vcmi SHARED ${lib_SRCS} ${lib_HEADERS}) add_library(vcmi SHARED ${lib_SRCS} ${lib_HEADERS})

View File

@ -6,17 +6,25 @@ include_directories(${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
set(server_SRCS set(server_SRCS
StdInc.cpp StdInc.cpp
CGameHandler.cpp CGameHandler.cpp
CVCMIServer.cpp
CQuery.cpp CQuery.cpp
CVCMIServer.cpp
NetPacksServer.cpp NetPacksServer.cpp
) )
set(server_HEADERS
StdInc.h
CGameHandler.h
CQuery.h
CVCMIServer.h
)
if(ANDROID) # android needs client/server to be libraries, not executables, so we can't reuse the build part of this script if(ANDROID) # android needs client/server to be libraries, not executables, so we can't reuse the build part of this script
return() return()
endif() endif()
add_executable(vcmiserver ${server_SRCS}) add_executable(vcmiserver ${server_SRCS} ${server_HEADERS})
target_link_libraries(vcmiserver vcmi ${Boost_LIBRARIES} ${SYSTEM_LIBS}) target_link_libraries(vcmiserver vcmi ${Boost_LIBRARIES} ${SYSTEM_LIBS})

View File

@ -5,15 +5,24 @@ include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CM
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
set(test_SRCS set(test_SRCS
StdInc.cpp StdInc.cpp
Battlefield.cpp
CVcmiTestConfig.cpp Battlefield.cpp
CMapEditManagerTest.cpp CMapEditManagerTest.cpp
MapComparer.cpp CMapFormatTest.cpp
CMapFormatTest.cpp CMemoryBufferTest.cpp
CVcmiTestConfig.cpp
MapComparer.cpp
) )
add_executable(vcmitest ${test_SRCS}) set(test_HEADERS
StdInc.h
CVcmiTestConfig.h
MapComparer.h
)
add_executable(vcmitest ${test_SRCS} ${test_HEADERS})
target_link_libraries(vcmitest vcmi ${Boost_LIBRARIES} ${RT_LIB} ${DL_LIB}) target_link_libraries(vcmitest vcmi ${Boost_LIBRARIES} ${RT_LIB} ${DL_LIB})
add_test(vcmitest vcmitest) add_test(vcmitest vcmitest)