mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Stub for a CMake build system.
This commit is contained in:
parent
fcdad0d323
commit
758fb0679e
7
AI/CMakeLists.txt
Normal file
7
AI/CMakeLists.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
project(AI)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
add_subdirectory(FuzzyLite)
|
||||||
|
add_subdirectory(StupidAI)
|
||||||
|
add_subdirectory(EmptyAI)
|
||||||
|
add_subdirectory(VCAI)
|
12
AI/EmptyAI/CMakeLists.txt
Normal file
12
AI/EmptyAI/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
project(emptyAI)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
|
|
||||||
|
set(emptyAI_SRCS
|
||||||
|
CEmptyAI.cpp
|
||||||
|
exp_funcs.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(emptyAI SHARED ${emptyAI_SRCS})
|
||||||
|
target_link_libraries(emptyAI vcmi_lib)
|
51
AI/FuzzyLite/CMakeLists.txt
Normal file
51
AI/FuzzyLite/CMakeLists.txt
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
project(FuzzyLite_lib)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
set(FuzzyLite_lib_SRCS
|
||||||
|
AreaCentroidAlgorithm.cpp
|
||||||
|
FuzzyOperation.cpp
|
||||||
|
OutputLVar.cpp
|
||||||
|
CompoundTerm.cpp
|
||||||
|
FuzzyOperator.cpp
|
||||||
|
RectangularTerm.cpp
|
||||||
|
DescriptiveAntecedent.cpp
|
||||||
|
FuzzyOr.cpp
|
||||||
|
RuleBlock.cpp
|
||||||
|
DiscreteTerm.cpp
|
||||||
|
FuzzyRule.cpp
|
||||||
|
ShoulderTerm.cpp
|
||||||
|
FunctionTerm.cpp
|
||||||
|
Hedge.cpp
|
||||||
|
SingletonTerm.cpp
|
||||||
|
FuzzyAnd.cpp
|
||||||
|
HedgeSet.cpp
|
||||||
|
StrOp.cpp
|
||||||
|
FuzzyAntecedent.cpp
|
||||||
|
InfixToPostfix.cpp
|
||||||
|
TakagiSugenoConsequent.cpp
|
||||||
|
FuzzyConsequent.cpp
|
||||||
|
InputLVar.cpp
|
||||||
|
TakagiSugenoRule.cpp
|
||||||
|
FuzzyDefuzzifier.cpp
|
||||||
|
LinguisticTerm.cpp
|
||||||
|
TakagiSugenoTerm.cpp
|
||||||
|
FuzzyEngine.cpp
|
||||||
|
LinguisticVariable.cpp
|
||||||
|
test.cpp
|
||||||
|
FuzzyException.cpp
|
||||||
|
main.cpp
|
||||||
|
TrapezoidalTerm.cpp
|
||||||
|
FuzzyExceptions.cpp
|
||||||
|
MamdaniConsequent.cpp
|
||||||
|
TriangularTerm.cpp
|
||||||
|
FuzzyModulation.cpp
|
||||||
|
MamdaniRule.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(FuzzyLite_lib STATIC ${FuzzyLite_lib_SRCS})
|
||||||
|
|
||||||
|
IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||||
|
SET_TARGET_PROPERTIES(FuzzyLite_lib PROPERTIES COMPILE_FLAGS "-fPIC")
|
||||||
|
ENDIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
12
AI/StupidAI/CMakeLists.txt
Normal file
12
AI/StupidAI/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
project(stupidAI)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
|
|
||||||
|
set(stupidAI_SRCS
|
||||||
|
StupidAI.cpp
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(stupidAI SHARED ${stupidAI_SRCS})
|
||||||
|
target_link_libraries(stupidAI vcmi_lib)
|
13
AI/VCAI/CMakeLists.txt
Normal file
13
AI/VCAI/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
project(VCAI)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib ${CMAKE_HOME_DIRECTORY}/AI/FuzzyLite)
|
||||||
|
|
||||||
|
set(VCAI_SRCS
|
||||||
|
main.cpp
|
||||||
|
VCAI.cpp
|
||||||
|
Fuzzy.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(VCAI SHARED ${VCAI_SRCS})
|
||||||
|
target_link_libraries(VCAI FuzzyLite_lib vcmi_lib)
|
25
CMakeLists.txt
Normal file
25
CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
project(vcmi)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
# where to look for cmake modules
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_HOME_DIRECTORY}/cmake_modules)
|
||||||
|
|
||||||
|
set(CMAKE_BUILD_TYPE Debug)
|
||||||
|
|
||||||
|
find_package(Boost COMPONENTS program_options filesystem system thread iostreams REQUIRED)
|
||||||
|
find_package(SDL REQUIRED)
|
||||||
|
find_package(SDL_image REQUIRED)
|
||||||
|
find_package(SDL_mixer REQUIRED)
|
||||||
|
find_package(SDL_ttf REQUIRED)
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(FFMPEG_swscale REQUIRED)
|
||||||
|
|
||||||
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
set(CMAKE_CXX_FLAGS "-std=c++0x -Wall -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wsign-compare -Wtype-limits -Wuninitialized")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(lib)
|
||||||
|
add_subdirectory(client)
|
||||||
|
add_subdirectory(server)
|
||||||
|
add_subdirectory(AI)
|
||||||
|
add_subdirectory(Scripting/ERM)
|
13
Scripting/ERM/CMakeLists.txt
Normal file
13
Scripting/ERM/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
project(vcmi_ERM)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIRECTORY})
|
||||||
|
|
||||||
|
set(lib_SRCS
|
||||||
|
ERMInterpreter.cpp
|
||||||
|
ERMParser.cpp
|
||||||
|
ERMScriptModule.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(vcmi_ERM_lib SHARED ${lib_SRCS})
|
||||||
|
target_link_libraries(vcmi_ERM_lib ${Boost_LIBRARIES})
|
55
client/CMakeLists.txt
Normal file
55
client/CMakeLists.txt
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
project(vcmi_client)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/BattleInterface ${CMAKE_CURRENT_SOURCE_DIR}/UIFramework)
|
||||||
|
include_directories(${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLMIXER_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR})
|
||||||
|
include_directories(${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} ${FFMPEG_INCLUDE_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
set(client_SRCS
|
||||||
|
../CCallback.cpp
|
||||||
|
BattleInterface/CBattleAnimations.cpp
|
||||||
|
BattleInterface/CBattleInterface.cpp
|
||||||
|
BattleInterface/CBattleInterfaceClasses.cpp
|
||||||
|
BattleInterface/CCreatureAnimation.cpp
|
||||||
|
UIFramework/CGuiHandler.cpp
|
||||||
|
UIFramework/CIntObject.cpp
|
||||||
|
UIFramework/CIntObjectClasses.cpp
|
||||||
|
UIFramework/Geometries.cpp
|
||||||
|
UIFramework/CCursorHandler.cpp
|
||||||
|
UIFramework/SDL_Extensions.cpp
|
||||||
|
AdventureMapClasses.cpp
|
||||||
|
CAdvmapInterface.cpp
|
||||||
|
CAnimation.cpp
|
||||||
|
CBitmapHandler.cpp
|
||||||
|
CCastleInterface.cpp
|
||||||
|
CConfigHandler.cpp
|
||||||
|
CCreatureWindow.cpp
|
||||||
|
CDefHandler.cpp
|
||||||
|
CGameInfo.cpp
|
||||||
|
CHeroWindow.cpp
|
||||||
|
CKingdomInterface.cpp
|
||||||
|
Client.cpp
|
||||||
|
CMessage.cpp
|
||||||
|
CMT.cpp
|
||||||
|
CMusicHandler.cpp
|
||||||
|
CPlayerInterface.cpp
|
||||||
|
CPreGame.cpp
|
||||||
|
CSndHandler.cpp
|
||||||
|
CSpellWindow.cpp
|
||||||
|
CVideoHandler.cpp
|
||||||
|
Graphics.cpp
|
||||||
|
GUIClasses.cpp
|
||||||
|
mapHandler.cpp
|
||||||
|
NetPacksClient.cpp
|
||||||
|
SDL_framerate.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(UNIX)
|
||||||
|
add_executable(vcmi_client ${client_SRCS})
|
||||||
|
ELSEIF(WIN32)
|
||||||
|
add_executable(vcmi_client WIN32 ${client_SRCS})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
target_link_libraries(vcmi_client vcmi_lib ${Boost_LIBRARIES} ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES})
|
73
cmake_modules/FindFFMPEG_swscale.cmake
Normal file
73
cmake_modules/FindFFMPEG_swscale.cmake
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# Find the FFmpeg library
|
||||||
|
#
|
||||||
|
# Sets
|
||||||
|
# FFMPEG_INCLUDE_DIR
|
||||||
|
# FFMPEG_LIBRARIES
|
||||||
|
|
||||||
|
FIND_PATH( FFMPEG_INCLUDE_DIR NAMES ffmpeg/avcodec.h libavcodec/avcodec.h
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
)
|
||||||
|
|
||||||
|
IF( FFMPEG_INCLUDE_DIR )
|
||||||
|
|
||||||
|
FIND_PROGRAM( FFMPEG_CONFIG ffmpeg-config
|
||||||
|
/usr/bin
|
||||||
|
/usr/local/bin
|
||||||
|
${HOME}/bin
|
||||||
|
)
|
||||||
|
|
||||||
|
IF( FFMPEG_CONFIG )
|
||||||
|
EXEC_PROGRAM( ${FFMPEG_CONFIG} ARGS "--libs avformat" OUTPUT_VARIABLE FFMPEG_LIBS )
|
||||||
|
SET( FFMPEG_LIBRARIES "${FFMPEG_LIBS}" )
|
||||||
|
|
||||||
|
ELSE( FFMPEG_CONFIG )
|
||||||
|
|
||||||
|
FIND_LIBRARY( FFMPEG_avcodec_LIBRARY avcodec
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib64
|
||||||
|
/usr/local/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY( FFMPEG_avformat_LIBRARY avformat
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib64
|
||||||
|
/usr/local/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY( FFMPEG_avutil_LIBRARY avutil
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib64
|
||||||
|
/usr/local/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY( FFMPEG_swscale_LIBRARY swscale
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib64
|
||||||
|
/usr/local/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
IF( FFMPEG_avcodec_LIBRARY )
|
||||||
|
IF( FFMPEG_avformat_LIBRARY )
|
||||||
|
|
||||||
|
SET( FFMPEG_LIBRARIES ${FFMPEG_avformat_LIBRARY} ${FFMPEG_avcodec_LIBRARY} )
|
||||||
|
IF( FFMPEG_avutil_LIBRARY )
|
||||||
|
SET( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_avutil_LIBRARY} )
|
||||||
|
ENDIF( FFMPEG_avutil_LIBRARY )
|
||||||
|
IF( FFMPEG_swscale_LIBRARY )
|
||||||
|
SET( FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${FFMPEG_swscale_LIBRARY} )
|
||||||
|
ENDIF( FFMPEG_swscale_LIBRARY )
|
||||||
|
|
||||||
|
ENDIF( FFMPEG_avformat_LIBRARY )
|
||||||
|
ENDIF( FFMPEG_avcodec_LIBRARY )
|
||||||
|
|
||||||
|
ENDIF( FFMPEG_CONFIG )
|
||||||
|
|
||||||
|
ENDIF( FFMPEG_INCLUDE_DIR )
|
||||||
|
|
||||||
|
INCLUDE (FindPackageHandleStandardArgs)
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFMPEG DEFAULT_MESSAGE FFMPEG_INCLUDE_DIR FFMPEG_LIBRARIES)
|
42
lib/CMakeLists.txt
Normal file
42
lib/CMakeLists.txt
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
project(vcmi_lib)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIRECTORY})
|
||||||
|
include_directories(${SDL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
|
set(lib_SRCS
|
||||||
|
BattleAction.cpp
|
||||||
|
BattleHex.cpp
|
||||||
|
BattleState.cpp
|
||||||
|
CArtHandler.cpp
|
||||||
|
CBuildingHandler.cpp
|
||||||
|
CCampaignHandler.cpp
|
||||||
|
CConsoleHandler.cpp
|
||||||
|
CCreatureHandler.cpp
|
||||||
|
CCreatureSet.cpp
|
||||||
|
CDefObjInfoHandler.cpp
|
||||||
|
CFileUtility.cpp
|
||||||
|
CGameInterface.cpp
|
||||||
|
CGameState.cpp
|
||||||
|
CGeneralTextHandler.cpp
|
||||||
|
CHeroHandler.cpp
|
||||||
|
CLodHandler.cpp
|
||||||
|
CLogger.cpp
|
||||||
|
CMapInfo.cpp
|
||||||
|
CObjectHandler.cpp
|
||||||
|
CObstacleInstance.cpp
|
||||||
|
Connection.cpp
|
||||||
|
CSpellHandler.cpp
|
||||||
|
CThreadHelper.cpp
|
||||||
|
CTownHandler.cpp
|
||||||
|
HeroBonus.cpp
|
||||||
|
IGameCallback.cpp
|
||||||
|
JsonNode.cpp
|
||||||
|
map.cpp
|
||||||
|
NetPacksLib.cpp
|
||||||
|
ResourceSet.cpp
|
||||||
|
VCMI_Lib.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(vcmi_lib SHARED ${lib_SRCS})
|
||||||
|
target_link_libraries(vcmi_lib ${Boost_LIBRARIES} ${SDL_LIBRARY} ${ZLIB_LIBRARIES})
|
19
server/CMakeLists.txt
Normal file
19
server/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
project(vcmi_server)
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
set(server_SRCS
|
||||||
|
CGameHandler.cpp
|
||||||
|
CVCMIServer.cpp
|
||||||
|
NetPacksServer.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(UNIX)
|
||||||
|
add_executable(vcmi_server ${server_SRCS})
|
||||||
|
ELSEIF(WIN32)
|
||||||
|
add_executable(vcmi_server WIN32 ${server_SRCS})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
target_link_libraries(vcmi_server vcmi_lib ${Boost_LIBRARIES})
|
Loading…
Reference in New Issue
Block a user