| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466 | 
							- set(client_SRCS
 
- 	StdInc.cpp
 
- 	../CCallback.cpp
 
- 	adventureMap/AdventureMapInterface.cpp
 
- 	adventureMap/AdventureMapShortcuts.cpp
 
- 	adventureMap/AdventureMapWidget.cpp
 
- 	adventureMap/AdventureOptions.cpp
 
- 	adventureMap/CInGameConsole.cpp
 
- 	adventureMap/CInfoBar.cpp
 
- 	adventureMap/CList.cpp
 
- 	adventureMap/CMinimap.cpp
 
- 	adventureMap/CResDataBar.cpp
 
- 	adventureMap/MapAudioPlayer.cpp
 
- 	battle/BattleActionsController.cpp
 
- 	battle/BattleAnimationClasses.cpp
 
- 	battle/BattleEffectsController.cpp
 
- 	battle/BattleFieldController.cpp
 
- 	battle/BattleInterface.cpp
 
- 	battle/BattleInterfaceClasses.cpp
 
- 	battle/BattleObstacleController.cpp
 
- 	battle/BattleProjectileController.cpp
 
- 	battle/BattleRenderer.cpp
 
- 	battle/BattleSiegeController.cpp
 
- 	battle/BattleStacksController.cpp
 
- 	battle/BattleWindow.cpp
 
- 	battle/CreatureAnimation.cpp
 
- 	eventsSDL/NotificationHandler.cpp
 
- 	eventsSDL/InputHandler.cpp
 
- 	eventsSDL/UserEventHandler.cpp
 
- 	eventsSDL/InputSourceKeyboard.cpp
 
- 	eventsSDL/InputSourceMouse.cpp
 
- 	eventsSDL/InputSourceText.cpp
 
- 	eventsSDL/InputSourceTouch.cpp
 
- 	gui/CGuiHandler.cpp
 
- 	gui/CIntObject.cpp
 
- 	gui/CursorHandler.cpp
 
- 	gui/EventDispatcher.cpp
 
- 	gui/EventsReceiver.cpp
 
- 	gui/InterfaceObjectConfigurable.cpp
 
- 	gui/FramerateManager.cpp
 
- 	gui/ShortcutHandler.cpp
 
- 	gui/WindowHandler.cpp
 
- 	lobby/CBonusSelection.cpp
 
- 	lobby/CCampaignInfoScreen.cpp
 
- 	lobby/CLobbyScreen.cpp
 
- 	lobby/CSavingScreen.cpp
 
- 	lobby/CScenarioInfoScreen.cpp
 
- 	lobby/CSelectionBase.cpp
 
- 	lobby/OptionsTab.cpp
 
- 	lobby/RandomMapTab.cpp
 
- 	lobby/SelectionTab.cpp
 
- 	mainmenu/CCampaignScreen.cpp
 
- 	mainmenu/CMainMenu.cpp
 
- 	mainmenu/CPrologEpilogVideo.cpp
 
- 	mainmenu/CreditsScreen.cpp
 
- 	mapView/MapRenderer.cpp
 
- 	mapView/MapRendererContext.cpp
 
- 	mapView/MapRendererContextState.cpp
 
- 	mapView/MapView.cpp
 
- 	mapView/MapViewActions.cpp
 
- 	mapView/MapViewCache.cpp
 
- 	mapView/MapViewController.cpp
 
- 	mapView/MapViewModel.cpp
 
- 	mapView/mapHandler.cpp
 
- 	render/CAnimation.cpp
 
- 	render/CBitmapHandler.cpp
 
- 	render/CDefFile.cpp
 
- 	render/Canvas.cpp
 
- 	render/ColorFilter.cpp
 
- 	render/Colors.cpp
 
- 	render/Graphics.cpp
 
- 	render/IFont.cpp
 
- 	renderSDL/CBitmapFont.cpp
 
- 	renderSDL/CBitmapHanFont.cpp
 
- 	renderSDL/CTrueTypeFont.cpp
 
- 	renderSDL/CursorHardware.cpp
 
- 	renderSDL/CursorSoftware.cpp
 
- 	renderSDL/SDLImage.cpp
 
- 	renderSDL/SDLImageLoader.cpp
 
- 	renderSDL/SDLRWwrapper.cpp
 
- 	renderSDL/ScreenHandler.cpp
 
- 	renderSDL/SDL_Extensions.cpp
 
- 	widgets/Buttons.cpp
 
- 	widgets/CArtifactHolder.cpp
 
- 	widgets/CComponent.cpp
 
- 	widgets/CGarrisonInt.cpp
 
- 	widgets/CreatureCostBox.cpp
 
- 	widgets/Images.cpp
 
- 	widgets/MiscWidgets.cpp
 
- 	widgets/ObjectLists.cpp
 
- 	widgets/TextControls.cpp
 
- 	widgets/Scrollable.cpp
 
- 	widgets/Slider.cpp
 
- 	widgets/CArtifactsOfHeroBase.cpp
 
- 	widgets/CArtifactsOfHeroMain.cpp
 
- 	widgets/CArtifactsOfHeroKingdom.cpp
 
- 	widgets/CArtifactsOfHeroAltar.cpp
 
- 	widgets/CArtifactsOfHeroMarket.cpp
 
- 	widgets/CWindowWithArtifacts.cpp
 
- 	windows/CCastleInterface.cpp
 
- 	windows/CCreatureWindow.cpp
 
- 	windows/CHeroWindow.cpp
 
- 	windows/CKingdomInterface.cpp
 
- 	windows/CMessage.cpp
 
- 	windows/CPuzzleWindow.cpp
 
- 	windows/CQuestLog.cpp
 
- 	windows/CSpellWindow.cpp
 
- 	windows/CTradeWindow.cpp
 
- 	windows/CWindowObject.cpp
 
- 	windows/CreaturePurchaseCard.cpp
 
- 	windows/GUIClasses.cpp
 
- 	windows/InfoWindows.cpp
 
- 	windows/QuickRecruitmentWindow.cpp
 
- 	windows/settings/GeneralOptionsTab.cpp
 
- 	windows/settings/OtherOptionsTab.cpp
 
- 	windows/settings/SettingsMainWindow.cpp
 
- 	windows/settings/BattleOptionsTab.cpp
 
- 	windows/settings/AdventureOptionsTab.cpp
 
- 	CGameInfo.cpp
 
- 	CMT.cpp
 
- 	CMusicHandler.cpp
 
- 	CPlayerInterface.cpp
 
- 	PlayerLocalState.cpp
 
- 	CServerHandler.cpp
 
- 	CVideoHandler.cpp
 
- 	Client.cpp
 
- 	ClientCommandManager.cpp
 
- 	NetPacksClient.cpp
 
- 	NetPacksLobbyClient.cpp
 
- )
 
- set(client_HEADERS
 
- 	StdInc.h
 
- 	adventureMap/AdventureMapInterface.h
 
- 	adventureMap/AdventureMapShortcuts.h
 
- 	adventureMap/AdventureMapWidget.h
 
- 	adventureMap/AdventureState.h
 
- 	adventureMap/AdventureOptions.h
 
- 	adventureMap/CInGameConsole.h
 
- 	adventureMap/CInfoBar.h
 
- 	adventureMap/CList.h
 
- 	adventureMap/CMinimap.h
 
- 	adventureMap/CResDataBar.h
 
- 	adventureMap/MapAudioPlayer.h
 
- 	battle/BattleActionsController.h
 
- 	battle/BattleAnimationClasses.h
 
- 	battle/BattleConstants.h
 
- 	battle/BattleEffectsController.h
 
- 	battle/BattleFieldController.h
 
- 	battle/BattleInterface.h
 
- 	battle/BattleInterfaceClasses.h
 
- 	battle/BattleObstacleController.h
 
- 	battle/BattleProjectileController.h
 
- 	battle/BattleRenderer.h
 
- 	battle/BattleSiegeController.h
 
- 	battle/BattleStacksController.h
 
- 	battle/BattleWindow.h
 
- 	battle/CreatureAnimation.h
 
- 	eventsSDL/NotificationHandler.h
 
- 	eventsSDL/InputHandler.h
 
- 	eventsSDL/UserEventHandler.h
 
- 	eventsSDL/InputSourceKeyboard.h
 
- 	eventsSDL/InputSourceMouse.h
 
- 	eventsSDL/InputSourceText.h
 
- 	eventsSDL/InputSourceTouch.h
 
- 	gui/CGuiHandler.h
 
- 	gui/CIntObject.h
 
- 	gui/CursorHandler.h
 
- 	gui/EventDispatcher.h
 
- 	gui/EventsReceiver.h
 
- 	gui/InterfaceObjectConfigurable.h
 
- 	gui/FramerateManager.h
 
- 	gui/MouseButton.h
 
- 	gui/Shortcut.h
 
- 	gui/ShortcutHandler.h
 
- 	gui/TextAlignment.h
 
- 	gui/WindowHandler.h
 
- 	lobby/CBonusSelection.h
 
- 	lobby/CCampaignInfoScreen.h
 
- 	lobby/CLobbyScreen.h
 
- 	lobby/CSavingScreen.h
 
- 	lobby/CScenarioInfoScreen.h
 
- 	lobby/CSelectionBase.h
 
- 	lobby/OptionsTab.h
 
- 	lobby/RandomMapTab.h
 
- 	lobby/SelectionTab.h
 
- 	mainmenu/CCampaignScreen.h
 
- 	mainmenu/CMainMenu.h
 
- 	mainmenu/CPrologEpilogVideo.h
 
- 	mainmenu/CreditsScreen.h
 
- 	mapView/IMapRendererContext.h
 
- 	mapView/IMapRendererObserver.h
 
- 	mapView/MapRenderer.h
 
- 	mapView/MapRendererContext.h
 
- 	mapView/MapRendererContextState.h
 
- 	mapView/MapView.h
 
- 	mapView/MapViewActions.h
 
- 	mapView/MapViewCache.h
 
- 	mapView/MapViewController.h
 
- 	mapView/MapViewModel.h
 
- 	mapView/mapHandler.h
 
- 	render/CAnimation.h
 
- 	render/CBitmapHandler.h
 
- 	render/CDefFile.h
 
- 	render/Canvas.h
 
- 	render/ColorFilter.h
 
- 	render/Colors.h
 
- 	render/Graphics.h
 
- 	render/ICursor.h
 
- 	render/IFont.h
 
- 	render/IImage.h
 
- 	render/IImageLoader.h
 
- 	render/IScreenHandler.h
 
- 	renderSDL/CBitmapFont.h
 
- 	renderSDL/CBitmapHanFont.h
 
- 	renderSDL/CTrueTypeFont.h
 
- 	renderSDL/CursorHardware.h
 
- 	renderSDL/CursorSoftware.h
 
- 	renderSDL/SDLImage.h
 
- 	renderSDL/SDLImageLoader.h
 
- 	renderSDL/SDLRWwrapper.h
 
- 	renderSDL/ScreenHandler.h
 
- 	renderSDL/SDL_Extensions.h
 
- 	renderSDL/SDL_PixelAccess.h
 
- 	widgets/Buttons.h
 
- 	widgets/CArtifactHolder.h
 
- 	widgets/CComponent.h
 
- 	widgets/CGarrisonInt.h
 
- 	widgets/CreatureCostBox.h
 
- 	widgets/Images.h
 
- 	widgets/MiscWidgets.h
 
- 	widgets/ObjectLists.h
 
- 	widgets/TextControls.h
 
- 	widgets/Scrollable.h
 
- 	widgets/Slider.h
 
- 	widgets/CArtifactsOfHeroBase.h
 
- 	widgets/CArtifactsOfHeroMain.h
 
- 	widgets/CArtifactsOfHeroKingdom.h
 
- 	widgets/CArtifactsOfHeroAltar.h
 
- 	widgets/CArtifactsOfHeroMarket.h
 
- 	widgets/CWindowWithArtifacts.h
 
- 	windows/CCastleInterface.h
 
- 	windows/CCreatureWindow.h
 
- 	windows/CHeroWindow.h
 
- 	windows/CKingdomInterface.h
 
- 	windows/CMessage.h
 
- 	windows/CPuzzleWindow.h
 
- 	windows/CQuestLog.h
 
- 	windows/CSpellWindow.h
 
- 	windows/CTradeWindow.h
 
- 	windows/CWindowObject.h
 
- 	windows/CreaturePurchaseCard.h
 
- 	windows/GUIClasses.h
 
- 	windows/InfoWindows.h
 
- 	windows/QuickRecruitmentWindow.h
 
- 	windows/settings/GeneralOptionsTab.h
 
- 	windows/settings/OtherOptionsTab.h
 
- 	windows/settings/SettingsMainWindow.h
 
- 	windows/settings/BattleOptionsTab.h
 
- 	windows/settings/AdventureOptionsTab.h
 
- 	CGameInfo.h
 
- 	CMT.h
 
- 	CMusicHandler.h
 
- 	CPlayerInterface.h
 
- 	PlayerLocalState.h
 
- 	CServerHandler.h
 
- 	CVideoHandler.h
 
- 	Client.h
 
- 	ClientCommandManager.h
 
- 	ClientNetPackVisitors.h
 
- 	LobbyClientNetPackVisitors.h
 
- 	resource.h
 
- )
 
- if(APPLE_IOS)
 
- 	set(client_SRCS ${client_SRCS}
 
- 		CFocusableHelper.cpp
 
- 		ios/GameChatKeyboardHandler.m
 
- 		ios/main.m
 
- 		ios/startSDL.mm
 
- 		ios/utils.mm
 
- 	)
 
- 	set(client_HEADERS ${client_HEADERS}
 
- 		CFocusableHelper.h
 
- 		ios/GameChatKeyboardHandler.h
 
- 		ios/startSDL.h
 
- 		ios/utils.h
 
- 	)
 
- endif()
 
- assign_source_group(${client_SRCS} ${client_HEADERS} VCMI_client.rc)
 
- if(ANDROID)
 
- 	add_library(vcmiclient SHARED ${client_SRCS} ${client_HEADERS})
 
- else()
 
- 	add_executable(vcmiclient ${client_SRCS} ${client_HEADERS})
 
- endif()
 
- add_dependencies(vcmiclient vcmiserver)
 
- if(NOT ENABLE_STATIC_AI_LIBS)
 
- 	add_dependencies(vcmiclient
 
- 		BattleAI
 
- 		EmptyAI
 
- 		StupidAI
 
- 		VCAI
 
- 	)
 
- 	if(ENABLE_NULLKILLER_AI)
 
- 		add_dependencies(vcmiclient Nullkiller)
 
- 	endif()
 
- endif()
 
- if(APPLE_IOS)
 
- 	if(ENABLE_ERM)
 
- 		add_dependencies(vcmiclient vcmiERM)
 
- 	endif()
 
- 	if(ENABLE_LUA)
 
- 		add_dependencies(vcmiclient vcmiLua)
 
- 	endif()
 
- endif()
 
- if(WIN32)
 
- 	target_sources(vcmiclient PRIVATE "VCMI_client.rc")
 
- 	set_target_properties(vcmiclient
 
- 		PROPERTIES
 
- 			OUTPUT_NAME "VCMI_client"
 
- 			PROJECT_LABEL "VCMI_client"
 
- 	)
 
- 	set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclient)
 
- 	if(NOT ENABLE_DEBUG_CONSOLE)
 
- 		set_target_properties(vcmiclient PROPERTIES WIN32_EXECUTABLE)
 
- 		target_link_libraries(vcmiclient SDL2::SDL2main)
 
- 	endif()
 
- 	target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
 
- # TODO: very hacky, find proper solution to copy AI dlls into bin dir
 
- 	if(MSVC)
 
- 		add_custom_command(TARGET vcmiclient POST_BUILD
 
- 			WORKING_DIRECTORY "$<TARGET_FILE_DIR:vcmiclient>"
 
- 			COMMAND ${CMAKE_COMMAND} -E copy AI/fuzzylite.dll fuzzylite.dll
 
- 			COMMAND ${CMAKE_COMMAND} -E copy AI/tbb12.dll tbb12.dll
 
- 		)
 
- 	endif()
 
- elseif(APPLE_IOS)
 
- 	target_link_libraries(vcmiclient PRIVATE
 
- 		iOS_utils
 
- 		# FFmpeg
 
- 		bz2
 
- 		iconv
 
- 		z
 
- 		"-framework AudioToolbox"
 
- 		"-framework AVFoundation"
 
- 		"-framework CoreMedia"
 
- 		"-framework VideoToolbox"
 
- 	)
 
- 	set_target_properties(vcmiclient PROPERTIES
 
- 		MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist"
 
- 		XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks"
 
- 		XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "$(CODE_SIGNING_ALLOWED_FOR_APPS)"
 
- 		XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
 
- 	)
 
- 	foreach(XCODE_RESOURCE LaunchScreen.storyboard Images.xcassets Settings.bundle vcmi_logo.png)
 
- 		set(XCODE_RESOURCE_PATH ios/${XCODE_RESOURCE})
 
- 		target_sources(vcmiclient PRIVATE ${XCODE_RESOURCE_PATH})
 
- 		set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
 
- 		# workaround to prevent CMAKE_SKIP_PRECOMPILE_HEADERS being added as compile flag
 
- 		if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0" AND CMAKE_VERSION VERSION_LESS "3.25.0")
 
- 			set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES LANGUAGE CXX)
 
- 		endif()
 
- 	endforeach()
 
- 	set(CMAKE_EXE_LINKER_FLAGS "-Wl,-e,_client_main")
 
- endif()
 
- if(ENABLE_SINGLE_APP_BUILD)
 
- 	target_link_libraries(vcmiclient PRIVATE vcmiserver)
 
- 	if(ENABLE_LAUNCHER)
 
- 		target_link_libraries(vcmiclient PRIVATE vcmilauncher)
 
- 	endif()
 
- endif()
 
- target_link_libraries(vcmiclient PRIVATE
 
- 		${VCMI_LIB_TARGET} SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF
 
- )
 
- if(ffmpeg_LIBRARIES)
 
- 	target_link_libraries(vcmiclient PRIVATE
 
- 		${ffmpeg_LIBRARIES}
 
- 	)
 
- else()
 
- 	target_compile_definitions(vcmiclient PRIVATE DISABLE_VIDEO)
 
- endif()
 
- target_include_directories(vcmiclient PUBLIC
 
- 	${CMAKE_CURRENT_SOURCE_DIR}
 
- )
 
- if (ffmpeg_INCLUDE_DIRS)
 
- 	target_include_directories(vcmiclient PRIVATE
 
- 		${ffmpeg_INCLUDE_DIRS}
 
- 	)
 
- endif()
 
- vcmi_set_output_dir(vcmiclient "")
 
- enable_pch(vcmiclient)
 
- if(APPLE_IOS)
 
- 	vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}")
 
- 	add_custom_command(TARGET vcmiclient POST_BUILD
 
- 		COMMAND ios/set_build_version.sh "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
 
- 		COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --component "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
 
- 		COMMAND ios/rpath_remove_symlinks.sh
 
- 		COMMAND ios/codesign.sh
 
- 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 
- 	)
 
- 	install(TARGETS vcmiclient DESTINATION Payload COMPONENT app) # for ipa generation with cpack
 
- elseif(ANDROID)
 
- 	vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
 
- 	add_custom_command(TARGET vcmiclient POST_BUILD
 
- 		COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "${CMAKE_SOURCE_DIR}/android/vcmi-app/src/main"
 
- 	)
 
- 	install(TARGETS vcmiclient DESTINATION ${LIB_DIR})
 
- else()
 
- 	install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
 
- endif()
 
- #install icons and desktop file on Linux
 
- if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
 
- 	#FIXME: move to client makefile?
 
- 	install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.16x16.png"     DESTINATION share/icons/hicolor/16x16/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.48x48.png"     DESTINATION share/icons/hicolor/48x48/apps RENAME vcmiclient.png)
 
- 	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.128x128.png"   DESTINATION share/icons/hicolor/128x128/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.512x512.png"   DESTINATION share/icons/hicolor/512x512/apps RENAME vcmiclient.png)
 
- 	install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.1024x1024.png" DESTINATION share/icons/hicolor/1024x1024/apps RENAME vcmiclient.png)
 
- 	install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.2048x2048.png" DESTINATION share/icons/hicolor/2048x2048/apps RENAME vcmiclient.png)
 
- 	install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.svg"           DESTINATION share/icons/hicolor/scalable/apps RENAME vcmiclient.svg)
 
- 	install(FILES "${CMAKE_SOURCE_DIR}/client/icons/vcmiclient.desktop"       DESTINATION share/applications)
 
- endif()
 
 
  |