2012-07-01 17:27:41 +03:00
|
|
|
set(client_SRCS
|
2014-02-05 23:25:36 +03:00
|
|
|
StdInc.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
../CCallback.cpp
|
2013-11-30 12:43:31 +03:00
|
|
|
|
2014-07-11 11:01:03 +03:00
|
|
|
battle/CBattleAnimations.cpp
|
|
|
|
battle/CBattleInterfaceClasses.cpp
|
2017-06-29 01:03:37 +02:00
|
|
|
battle/CBattleInterface.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
battle/CCreatureAnimation.cpp
|
|
|
|
|
2014-07-15 10:14:49 +03:00
|
|
|
gui/CAnimation.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
gui/CCursorHandler.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
gui/CGuiHandler.cpp
|
|
|
|
gui/CIntObject.cpp
|
|
|
|
gui/Fonts.cpp
|
|
|
|
gui/Geometries.cpp
|
|
|
|
gui/SDL_Extensions.cpp
|
2013-11-30 12:43:31 +03:00
|
|
|
|
2014-07-13 20:53:37 +03:00
|
|
|
widgets/AdventureMapClasses.cpp
|
2014-07-15 10:14:49 +03:00
|
|
|
widgets/Buttons.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
widgets/CArtifactHolder.cpp
|
|
|
|
widgets/CComponent.cpp
|
|
|
|
widgets/CGarrisonInt.cpp
|
2014-07-15 10:14:49 +03:00
|
|
|
widgets/Images.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
widgets/MiscWidgets.cpp
|
2014-07-15 10:14:49 +03:00
|
|
|
widgets/ObjectLists.cpp
|
|
|
|
widgets/TextControls.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
|
|
|
|
windows/CAdvmapInterface.cpp
|
|
|
|
windows/CCastleInterface.cpp
|
|
|
|
windows/CCreatureWindow.cpp
|
2017-12-20 21:08:21 +02:00
|
|
|
windows/CreaturePurchaseCard.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
windows/CHeroWindow.cpp
|
|
|
|
windows/CKingdomInterface.cpp
|
|
|
|
windows/CQuestLog.cpp
|
|
|
|
windows/CSpellWindow.cpp
|
|
|
|
windows/CTradeWindow.cpp
|
2017-06-29 01:03:37 +02:00
|
|
|
windows/CWindowObject.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
windows/GUIClasses.cpp
|
2017-06-29 01:03:37 +02:00
|
|
|
windows/InfoWindows.cpp
|
2017-11-01 15:58:49 +02:00
|
|
|
windows/QuickRecruitmentWindow.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
|
2018-01-05 19:21:07 +02:00
|
|
|
mainmenu/CMainMenu.cpp
|
|
|
|
mainmenu/CCampaignScreen.cpp
|
|
|
|
mainmenu/CreditsScreen.cpp
|
|
|
|
mainmenu/CPrologEpilogVideo.cpp
|
|
|
|
|
|
|
|
lobby/CBonusSelection.cpp
|
|
|
|
lobby/CSelectionBase.cpp
|
|
|
|
lobby/CLobbyScreen.cpp
|
|
|
|
lobby/CSavingScreen.cpp
|
|
|
|
lobby/CScenarioInfoScreen.cpp
|
|
|
|
lobby/OptionsTab.cpp
|
|
|
|
lobby/RandomMapTab.cpp
|
|
|
|
lobby/SelectionTab.cpp
|
|
|
|
|
2014-07-11 11:01:03 +03:00
|
|
|
CBitmapHandler.cpp
|
2017-11-01 15:58:49 +02:00
|
|
|
CreatureCostBox.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
CGameInfo.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
Client.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
CMessage.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
CMT.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
CMusicHandler.cpp
|
2014-07-13 20:53:37 +03:00
|
|
|
CPlayerInterface.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
CVideoHandler.cpp
|
2018-01-05 19:21:07 +02:00
|
|
|
CServerHandler.cpp
|
2014-07-11 11:01:03 +03:00
|
|
|
Graphics.cpp
|
|
|
|
mapHandler.cpp
|
|
|
|
NetPacksClient.cpp
|
2018-01-05 19:21:07 +02:00
|
|
|
NetPacksLobbyClient.cpp
|
2016-01-30 23:34:46 +02:00
|
|
|
SDLRWwrapper.cpp
|
2012-07-01 17:27:41 +03:00
|
|
|
)
|
|
|
|
|
2014-07-15 10:14:49 +03:00
|
|
|
set(client_HEADERS
|
2017-06-29 01:03:37 +02:00
|
|
|
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
|
2014-07-15 10:14:49 +03:00
|
|
|
gui/SDL_Pixels.h
|
2017-06-29 01:03:37 +02:00
|
|
|
|
|
|
|
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
|
2017-12-20 21:08:21 +02:00
|
|
|
windows/CreaturePurchaseCard.h
|
2017-06-29 01:03:37 +02:00
|
|
|
windows/CHeroWindow.h
|
|
|
|
windows/CKingdomInterface.h
|
|
|
|
windows/CQuestLog.h
|
|
|
|
windows/CSpellWindow.h
|
|
|
|
windows/CTradeWindow.h
|
|
|
|
windows/CWindowObject.h
|
|
|
|
windows/GUIClasses.h
|
|
|
|
windows/InfoWindows.h
|
2017-11-01 15:58:49 +02:00
|
|
|
windows/QuickRecruitmentWindow.h
|
2017-06-29 01:03:37 +02:00
|
|
|
|
2018-01-05 19:21:07 +02:00
|
|
|
mainmenu/CMainMenu.h
|
|
|
|
mainmenu/CCampaignScreen.h
|
|
|
|
mainmenu/CreditsScreen.h
|
|
|
|
mainmenu/CPrologEpilogVideo.h
|
|
|
|
|
|
|
|
lobby/CBonusSelection.h
|
|
|
|
lobby/CSelectionBase.h
|
|
|
|
lobby/CLobbyScreen.h
|
|
|
|
lobby/CSavingScreen.h
|
|
|
|
lobby/CScenarioInfoScreen.h
|
|
|
|
lobby/OptionsTab.h
|
|
|
|
lobby/RandomMapTab.h
|
|
|
|
lobby/SelectionTab.h
|
|
|
|
|
2017-06-29 01:03:37 +02:00
|
|
|
CBitmapHandler.h
|
2017-11-01 15:58:49 +02:00
|
|
|
CreatureCostBox.h
|
2017-06-29 01:03:37 +02:00
|
|
|
CGameInfo.h
|
|
|
|
Client.h
|
|
|
|
CMessage.h
|
|
|
|
CMT.h
|
|
|
|
CMusicHandler.h
|
|
|
|
CPlayerInterface.h
|
|
|
|
CVideoHandler.h
|
2018-01-05 19:21:07 +02:00
|
|
|
CServerHandler.h
|
2017-06-29 01:03:37 +02:00
|
|
|
Graphics.h
|
|
|
|
mapHandler.h
|
|
|
|
resource.h
|
|
|
|
SDLMain.h
|
|
|
|
SDLRWwrapper.h
|
2014-07-15 10:14:49 +03:00
|
|
|
)
|
|
|
|
|
2017-08-15 20:17:00 +02:00
|
|
|
assign_source_group(${client_SRCS} ${client_HEADERS} VCMI_client.rc)
|
|
|
|
|
2017-05-25 19:57:20 +02:00
|
|
|
if(ANDROID) # android needs client/server to be libraries, not executables, so we can't reuse the build part of this script
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2014-07-10 00:47:22 +03:00
|
|
|
if(APPLE)
|
2017-08-07 18:43:32 +02:00
|
|
|
set(client_SRCS ${client_SRCS} SDLMain.m)
|
|
|
|
elseif(WIN32)
|
|
|
|
set(client_ICON "VCMI_client.rc")
|
|
|
|
endif()
|
|
|
|
|
2017-08-16 15:29:18 +02:00
|
|
|
if(ENABLE_DEBUG_CONSOLE)
|
|
|
|
add_executable(vcmiclient ${client_SRCS} ${client_HEADERS} ${client_ICON})
|
|
|
|
else()
|
|
|
|
add_executable(vcmiclient WIN32 ${client_SRCS} ${client_HEADERS} ${client_ICON})
|
|
|
|
endif(ENABLE_DEBUG_CONSOLE)
|
2017-10-31 08:28:35 +02:00
|
|
|
add_dependencies(vcmiclient vcmiserver BattleAI StupidAI VCAI)
|
2012-07-01 17:27:41 +03:00
|
|
|
|
2014-07-10 01:06:37 +03:00
|
|
|
if(WIN32)
|
2017-08-15 20:17:00 +02:00
|
|
|
set_target_properties(vcmiclient
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME "VCMI_client"
|
|
|
|
PROJECT_LABEL "VCMI_client"
|
|
|
|
)
|
2017-10-31 08:28:35 +02:00
|
|
|
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclient)
|
2017-08-16 15:29:18 +02:00
|
|
|
if(NOT ENABLE_DEBUG_CONSOLE)
|
|
|
|
target_link_libraries(vcmiclient ${SDLMAIN_LIBRARY})
|
|
|
|
endif()
|
2014-07-10 01:06:37 +03:00
|
|
|
endif()
|
|
|
|
|
2019-03-20 21:58:15 +02:00
|
|
|
target_link_libraries(vcmiclient PRIVATE
|
|
|
|
vcmi ${SDL2_LIBRARY} ${SDL2_IMAGE_LIBRARY} ${SDL2_MIXER_LIBRARY} ${SDL2_TTF_LIBRARY}
|
2021-05-16 14:39:38 +02:00
|
|
|
${FFMPEG_LIBRARIES} ${FFMPEG_EXTRA_LINKING_OPTIONS} ${TBB_LIBRARIES}
|
2017-08-15 20:18:02 +02:00
|
|
|
)
|
2019-01-19 01:57:54 +02:00
|
|
|
|
|
|
|
target_include_directories(vcmi
|
|
|
|
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
PUBLIC ${SDL2_INCLUDE_DIR}
|
|
|
|
PRIVATE ${SDL2_TTF_INCLUDE_DIR}
|
|
|
|
PRIVATE ${SDL2_MIXER_INCLUDE_DIR}
|
|
|
|
PRIVATE ${SDL2_IMAGE_INCLUDE_DIR}
|
|
|
|
PRIVATE ${FFMPEG_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2017-07-04 22:46:49 +02:00
|
|
|
vcmi_set_output_dir(vcmiclient "")
|
|
|
|
|
2014-02-05 23:25:36 +03:00
|
|
|
set_target_properties(vcmiclient PROPERTIES ${PCH_PROPERTIES})
|
|
|
|
cotire(vcmiclient)
|
2014-02-01 16:37:26 +03:00
|
|
|
|
2017-08-12 20:58:09 +02:00
|
|
|
install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
|
|
|
|
|
|
|
|
#install icons and desktop file on Linux
|
|
|
|
if(NOT WIN32 AND NOT APPLE)
|
|
|
|
#FIXME: move to client makefile?
|
|
|
|
install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.64x64.png" DESTINATION share/icons/hicolor/64x64/apps RENAME vcmiclient.png)
|
|
|
|
install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.48x48.png" DESTINATION share/icons/hicolor/48x48/apps RENAME vcmiclient.png)
|
|
|
|
install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.32x32.png" DESTINATION share/icons/hicolor/32x32/apps RENAME vcmiclient.png)
|
|
|
|
install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.256x256.png" DESTINATION share/icons/hicolor/256x256/apps RENAME vcmiclient.png)
|
|
|
|
install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.desktop" DESTINATION share/applications)
|
|
|
|
endif()
|