CMakeLists.txt 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. set(client_SRCS
  2. StdInc.cpp
  3. ../CCallback.cpp
  4. adventureMap/AdventureMapInterface.cpp
  5. adventureMap/AdventureMapShortcuts.cpp
  6. adventureMap/AdventureMapWidget.cpp
  7. adventureMap/AdventureOptions.cpp
  8. adventureMap/CInGameConsole.cpp
  9. adventureMap/CInfoBar.cpp
  10. adventureMap/CList.cpp
  11. adventureMap/CMinimap.cpp
  12. adventureMap/CResDataBar.cpp
  13. adventureMap/MapAudioPlayer.cpp
  14. adventureMap/TurnTimerWidget.cpp
  15. battle/BattleActionsController.cpp
  16. battle/BattleAnimationClasses.cpp
  17. battle/BattleEffectsController.cpp
  18. battle/BattleFieldController.cpp
  19. battle/BattleInterface.cpp
  20. battle/BattleInterfaceClasses.cpp
  21. battle/BattleObstacleController.cpp
  22. battle/BattleProjectileController.cpp
  23. battle/BattleRenderer.cpp
  24. battle/BattleSiegeController.cpp
  25. battle/BattleStacksController.cpp
  26. battle/BattleWindow.cpp
  27. battle/CreatureAnimation.cpp
  28. eventsSDL/NotificationHandler.cpp
  29. eventsSDL/InputHandler.cpp
  30. eventsSDL/InputSourceKeyboard.cpp
  31. eventsSDL/InputSourceMouse.cpp
  32. eventsSDL/InputSourceText.cpp
  33. eventsSDL/InputSourceTouch.cpp
  34. eventsSDL/InputSourceGameController.cpp
  35. gui/CGuiHandler.cpp
  36. gui/CIntObject.cpp
  37. gui/CursorHandler.cpp
  38. gui/EventDispatcher.cpp
  39. gui/EventsReceiver.cpp
  40. gui/InterfaceObjectConfigurable.cpp
  41. gui/FramerateManager.cpp
  42. gui/ShortcutHandler.cpp
  43. gui/WindowHandler.cpp
  44. lobby/CBonusSelection.cpp
  45. lobby/CCampaignInfoScreen.cpp
  46. lobby/CLobbyScreen.cpp
  47. lobby/CSavingScreen.cpp
  48. lobby/CScenarioInfoScreen.cpp
  49. lobby/CSelectionBase.cpp
  50. lobby/TurnOptionsTab.cpp
  51. lobby/ExtraOptionsTab.cpp
  52. lobby/OptionsTab.cpp
  53. lobby/OptionsTabBase.cpp
  54. lobby/RandomMapTab.cpp
  55. lobby/SelectionTab.cpp
  56. mainmenu/CCampaignScreen.cpp
  57. mainmenu/CMainMenu.cpp
  58. mainmenu/CPrologEpilogVideo.cpp
  59. mainmenu/CreditsScreen.cpp
  60. mainmenu/CHighScoreScreen.cpp
  61. mapView/MapRenderer.cpp
  62. mapView/MapRendererContext.cpp
  63. mapView/MapRendererContextState.cpp
  64. mapView/MapView.cpp
  65. mapView/MapViewActions.cpp
  66. mapView/MapViewCache.cpp
  67. mapView/MapViewController.cpp
  68. mapView/MapViewModel.cpp
  69. mapView/mapHandler.cpp
  70. media/CAudioBase.cpp
  71. media/CMusicHandler.cpp
  72. media/CSoundHandler.cpp
  73. media/CVideoHandler.cpp
  74. render/CAnimation.cpp
  75. render/CBitmapHandler.cpp
  76. render/CDefFile.cpp
  77. render/Canvas.cpp
  78. render/ColorFilter.cpp
  79. render/Colors.cpp
  80. render/Graphics.cpp
  81. render/IFont.cpp
  82. render/ImageLocator.cpp
  83. renderSDL/CBitmapFont.cpp
  84. renderSDL/CBitmapHanFont.cpp
  85. renderSDL/CTrueTypeFont.cpp
  86. renderSDL/CursorHardware.cpp
  87. renderSDL/CursorSoftware.cpp
  88. renderSDL/RenderHandler.cpp
  89. renderSDL/SDLImage.cpp
  90. renderSDL/SDLImageLoader.cpp
  91. renderSDL/SDLRWwrapper.cpp
  92. renderSDL/ScreenHandler.cpp
  93. renderSDL/SDL_Extensions.cpp
  94. globalLobby/GlobalLobbyClient.cpp
  95. globalLobby/GlobalLobbyInviteWindow.cpp
  96. globalLobby/GlobalLobbyLoginWindow.cpp
  97. globalLobby/GlobalLobbyRoomWindow.cpp
  98. globalLobby/GlobalLobbyServerSetup.cpp
  99. globalLobby/GlobalLobbyWidget.cpp
  100. globalLobby/GlobalLobbyWindow.cpp
  101. widgets/Buttons.cpp
  102. widgets/CArtPlace.cpp
  103. widgets/CComponent.cpp
  104. widgets/CExchangeController.cpp
  105. widgets/CGarrisonInt.cpp
  106. widgets/CreatureCostBox.cpp
  107. widgets/ComboBox.cpp
  108. widgets/CTextInput.cpp
  109. widgets/GraphicalPrimitiveCanvas.cpp
  110. widgets/Images.cpp
  111. widgets/MiscWidgets.cpp
  112. widgets/ObjectLists.cpp
  113. widgets/TextControls.cpp
  114. widgets/Scrollable.cpp
  115. widgets/Slider.cpp
  116. widgets/CArtifactsOfHeroBase.cpp
  117. widgets/CArtifactsOfHeroMain.cpp
  118. widgets/CArtifactsOfHeroKingdom.cpp
  119. widgets/CArtifactsOfHeroAltar.cpp
  120. widgets/CArtifactsOfHeroMarket.cpp
  121. widgets/CArtifactsOfHeroBackpack.cpp
  122. widgets/RadialMenu.cpp
  123. widgets/VideoWidget.cpp
  124. widgets/markets/CAltarArtifacts.cpp
  125. widgets/markets/CAltarCreatures.cpp
  126. widgets/markets/CArtifactsBuying.cpp
  127. widgets/markets/CArtifactsSelling.cpp
  128. widgets/markets/CFreelancerGuild.cpp
  129. widgets/markets/CMarketResources.cpp
  130. widgets/markets/CTransferResources.cpp
  131. widgets/markets/CMarketBase.cpp
  132. widgets/markets/TradePanels.cpp
  133. windows/CCastleInterface.cpp
  134. windows/CCreatureWindow.cpp
  135. windows/CExchangeWindow.cpp
  136. windows/CHeroOverview.cpp
  137. windows/CHeroWindow.cpp
  138. windows/CKingdomInterface.cpp
  139. windows/CMapOverview.cpp
  140. windows/CMarketWindow.cpp
  141. windows/CMessage.cpp
  142. windows/CPuzzleWindow.cpp
  143. windows/CQuestLog.cpp
  144. windows/CSpellWindow.cpp
  145. windows/CTutorialWindow.cpp
  146. windows/CWindowObject.cpp
  147. windows/CreaturePurchaseCard.cpp
  148. windows/GUIClasses.cpp
  149. windows/InfoWindows.cpp
  150. windows/QuickRecruitmentWindow.cpp
  151. windows/CHeroBackpackWindow.cpp
  152. windows/CWindowWithArtifacts.cpp
  153. windows/settings/GeneralOptionsTab.cpp
  154. windows/settings/OtherOptionsTab.cpp
  155. windows/settings/SettingsMainWindow.cpp
  156. windows/settings/BattleOptionsTab.cpp
  157. windows/settings/AdventureOptionsTab.cpp
  158. ArtifactsUIController.cpp
  159. CGameInfo.cpp
  160. CMT.cpp
  161. CPlayerInterface.cpp
  162. PlayerLocalState.cpp
  163. CServerHandler.cpp
  164. Client.cpp
  165. ClientCommandManager.cpp
  166. GameChatHandler.cpp
  167. HeroMovementController.cpp
  168. NetPacksClient.cpp
  169. NetPacksLobbyClient.cpp
  170. ServerRunner.cpp
  171. )
  172. set(client_HEADERS
  173. StdInc.h
  174. adventureMap/AdventureMapInterface.h
  175. adventureMap/AdventureMapShortcuts.h
  176. adventureMap/AdventureMapWidget.h
  177. adventureMap/AdventureState.h
  178. adventureMap/AdventureOptions.h
  179. adventureMap/CInGameConsole.h
  180. adventureMap/CInfoBar.h
  181. adventureMap/CList.h
  182. adventureMap/CMinimap.h
  183. adventureMap/CResDataBar.h
  184. adventureMap/MapAudioPlayer.h
  185. adventureMap/TurnTimerWidget.h
  186. battle/BattleActionsController.h
  187. battle/BattleAnimationClasses.h
  188. battle/BattleConstants.h
  189. battle/BattleEffectsController.h
  190. battle/BattleFieldController.h
  191. battle/BattleInterface.h
  192. battle/BattleInterfaceClasses.h
  193. battle/BattleObstacleController.h
  194. battle/BattleProjectileController.h
  195. battle/BattleRenderer.h
  196. battle/BattleSiegeController.h
  197. battle/BattleStacksController.h
  198. battle/BattleWindow.h
  199. battle/CreatureAnimation.h
  200. eventsSDL/NotificationHandler.h
  201. eventsSDL/InputHandler.h
  202. eventsSDL/InputSourceKeyboard.h
  203. eventsSDL/InputSourceMouse.h
  204. eventsSDL/InputSourceText.h
  205. eventsSDL/InputSourceTouch.h
  206. eventsSDL/InputSourceGameController.h
  207. gui/CGuiHandler.h
  208. gui/CIntObject.h
  209. gui/CursorHandler.h
  210. gui/EventDispatcher.h
  211. gui/EventsReceiver.h
  212. gui/InterfaceObjectConfigurable.h
  213. gui/FramerateManager.h
  214. gui/MouseButton.h
  215. gui/Shortcut.h
  216. gui/ShortcutHandler.h
  217. gui/TextAlignment.h
  218. gui/WindowHandler.h
  219. lobby/CBonusSelection.h
  220. lobby/CCampaignInfoScreen.h
  221. lobby/CLobbyScreen.h
  222. lobby/CSavingScreen.h
  223. lobby/CScenarioInfoScreen.h
  224. lobby/CSelectionBase.h
  225. lobby/TurnOptionsTab.h
  226. lobby/ExtraOptionsTab.h
  227. lobby/OptionsTab.h
  228. lobby/OptionsTabBase.h
  229. lobby/RandomMapTab.h
  230. lobby/SelectionTab.h
  231. mainmenu/CCampaignScreen.h
  232. mainmenu/CMainMenu.h
  233. mainmenu/CPrologEpilogVideo.h
  234. mainmenu/CreditsScreen.h
  235. mainmenu/CHighScoreScreen.h
  236. mapView/IMapRendererContext.h
  237. mapView/IMapRendererObserver.h
  238. mapView/MapRenderer.h
  239. mapView/MapRendererContext.h
  240. mapView/MapRendererContextState.h
  241. mapView/MapView.h
  242. mapView/MapViewActions.h
  243. mapView/MapViewCache.h
  244. mapView/MapViewController.h
  245. mapView/MapViewModel.h
  246. mapView/mapHandler.h
  247. media/CAudioBase.h
  248. media/CEmptyVideoPlayer.h
  249. media/CMusicHandler.h
  250. media/CSoundHandler.h
  251. media/CVideoHandler.h
  252. media/IMusicPlayer.h
  253. media/ISoundPlayer.h
  254. media/IVideoPlayer.h
  255. render/CAnimation.h
  256. render/CBitmapHandler.h
  257. render/CDefFile.h
  258. render/Canvas.h
  259. render/ColorFilter.h
  260. render/Colors.h
  261. render/EFont.h
  262. render/Graphics.h
  263. render/ICursor.h
  264. render/IFont.h
  265. render/IImage.h
  266. render/IImageLoader.h
  267. render/ImageLocator.h
  268. render/IRenderHandler.h
  269. render/IScreenHandler.h
  270. renderSDL/CBitmapFont.h
  271. renderSDL/CBitmapHanFont.h
  272. renderSDL/CTrueTypeFont.h
  273. renderSDL/CursorHardware.h
  274. renderSDL/CursorSoftware.h
  275. renderSDL/RenderHandler.h
  276. renderSDL/SDLImage.h
  277. renderSDL/SDLImageLoader.h
  278. renderSDL/SDLRWwrapper.h
  279. renderSDL/ScreenHandler.h
  280. renderSDL/SDL_Extensions.h
  281. renderSDL/SDL_PixelAccess.h
  282. globalLobby/GlobalLobbyClient.h
  283. globalLobby/GlobalLobbyDefines.h
  284. globalLobby/GlobalLobbyInviteWindow.h
  285. globalLobby/GlobalLobbyLoginWindow.h
  286. globalLobby/GlobalLobbyRoomWindow.h
  287. globalLobby/GlobalLobbyServerSetup.h
  288. globalLobby/GlobalLobbyObserver.h
  289. globalLobby/GlobalLobbyWidget.h
  290. globalLobby/GlobalLobbyWindow.h
  291. widgets/Buttons.h
  292. widgets/CArtPlace.h
  293. widgets/CComponent.h
  294. widgets/CExchangeController.h
  295. widgets/CGarrisonInt.h
  296. widgets/CreatureCostBox.h
  297. widgets/ComboBox.h
  298. widgets/CTextInput.h
  299. widgets/GraphicalPrimitiveCanvas.h
  300. widgets/Images.h
  301. widgets/MiscWidgets.h
  302. widgets/ObjectLists.h
  303. widgets/TextControls.h
  304. widgets/Scrollable.h
  305. widgets/Slider.h
  306. widgets/CArtifactsOfHeroBase.h
  307. widgets/CArtifactsOfHeroMain.h
  308. widgets/CArtifactsOfHeroKingdom.h
  309. widgets/CArtifactsOfHeroAltar.h
  310. widgets/CArtifactsOfHeroMarket.h
  311. widgets/CArtifactsOfHeroBackpack.h
  312. widgets/RadialMenu.h
  313. widgets/VideoWidget.h
  314. widgets/markets/CAltarArtifacts.h
  315. widgets/markets/CAltarCreatures.h
  316. widgets/markets/CArtifactsBuying.h
  317. widgets/markets/CArtifactsSelling.h
  318. widgets/markets/CFreelancerGuild.h
  319. widgets/markets/CMarketResources.h
  320. widgets/markets/CTransferResources.h
  321. widgets/markets/CMarketBase.h
  322. widgets/markets/TradePanels.h
  323. windows/CCastleInterface.h
  324. windows/CCreatureWindow.h
  325. windows/CExchangeWindow.h
  326. windows/CHeroOverview.h
  327. windows/CHeroWindow.h
  328. windows/CKingdomInterface.h
  329. windows/CMessage.h
  330. windows/CMapOverview.h
  331. windows/CMarketWindow.h
  332. windows/CPuzzleWindow.h
  333. windows/CQuestLog.h
  334. windows/CSpellWindow.h
  335. windows/CTutorialWindow.h
  336. windows/CWindowObject.h
  337. windows/CreaturePurchaseCard.h
  338. windows/GUIClasses.h
  339. windows/InfoWindows.h
  340. windows/QuickRecruitmentWindow.h
  341. windows/CHeroBackpackWindow.h
  342. windows/CWindowWithArtifacts.h
  343. windows/settings/GeneralOptionsTab.h
  344. windows/settings/OtherOptionsTab.h
  345. windows/settings/SettingsMainWindow.h
  346. windows/settings/BattleOptionsTab.h
  347. windows/settings/AdventureOptionsTab.h
  348. ArtifactsUIController.h
  349. CGameInfo.h
  350. CMT.h
  351. CPlayerInterface.h
  352. PlayerLocalState.h
  353. CServerHandler.h
  354. Client.h
  355. ClientCommandManager.h
  356. ClientNetPackVisitors.h
  357. ConditionalWait.h
  358. HeroMovementController.h
  359. GameChatHandler.h
  360. LobbyClientNetPackVisitors.h
  361. ServerRunner.h
  362. resource.h
  363. )
  364. if(APPLE_IOS)
  365. set(client_SRCS ${client_SRCS}
  366. CFocusableHelper.cpp
  367. ios/GameChatKeyboardHandler.m
  368. ios/main.m
  369. ios/startSDL.mm
  370. ios/utils.mm
  371. )
  372. set(client_HEADERS ${client_HEADERS}
  373. CFocusableHelper.h
  374. ios/GameChatKeyboardHandler.h
  375. ios/startSDL.h
  376. ios/utils.h
  377. )
  378. endif()
  379. assign_source_group(${client_SRCS} ${client_HEADERS} VCMI_client.rc)
  380. if(ANDROID)
  381. add_library(vcmiclient SHARED ${client_SRCS} ${client_HEADERS})
  382. set_target_properties(vcmiclient PROPERTIES
  383. OUTPUT_NAME "vcmiclient_${ANDROID_ABI}" # required by Qt
  384. )
  385. else()
  386. add_executable(vcmiclient ${client_SRCS} ${client_HEADERS})
  387. endif()
  388. if(NOT ENABLE_STATIC_LIBS)
  389. add_dependencies(vcmiclient
  390. BattleAI
  391. EmptyAI
  392. StupidAI
  393. VCAI
  394. )
  395. if(ENABLE_NULLKILLER_AI)
  396. add_dependencies(vcmiclient Nullkiller)
  397. endif()
  398. endif()
  399. if(APPLE_IOS)
  400. if(ENABLE_ERM)
  401. add_dependencies(vcmiclient vcmiERM)
  402. endif()
  403. if(ENABLE_LUA)
  404. add_dependencies(vcmiclient vcmiLua)
  405. endif()
  406. endif()
  407. if(WIN32)
  408. target_sources(vcmiclient PRIVATE "VCMI_client.rc")
  409. set_target_properties(vcmiclient
  410. PROPERTIES
  411. OUTPUT_NAME "VCMI_client"
  412. PROJECT_LABEL "VCMI_client"
  413. )
  414. set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vcmiclient)
  415. if(NOT ENABLE_DEBUG_CONSOLE)
  416. set_target_properties(vcmiclient PROPERTIES WIN32_EXECUTABLE)
  417. target_link_libraries(vcmiclient SDL2::SDL2main)
  418. endif()
  419. target_compile_definitions(vcmiclient PRIVATE WINDOWS_IGNORE_PACKING_MISMATCH)
  420. # TODO: very hacky, find proper solution to copy AI dlls into bin dir
  421. if(MSVC)
  422. add_custom_command(TARGET vcmiclient POST_BUILD
  423. WORKING_DIRECTORY "$<TARGET_FILE_DIR:vcmiclient>"
  424. COMMAND ${CMAKE_COMMAND} -E copy AI/fuzzylite.dll fuzzylite.dll
  425. COMMAND ${CMAKE_COMMAND} -E copy AI/tbb12.dll tbb12.dll
  426. )
  427. endif()
  428. elseif(APPLE_IOS)
  429. target_link_libraries(vcmiclient PRIVATE
  430. iOS_utils
  431. # FFmpeg
  432. bz2
  433. iconv
  434. z
  435. "-framework AudioToolbox"
  436. "-framework AVFoundation"
  437. "-framework CoreMedia"
  438. "-framework VideoToolbox"
  439. )
  440. set_target_properties(vcmiclient PROPERTIES
  441. MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_LIST_DIR}/ios/Info.plist"
  442. XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/Frameworks"
  443. XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "$(CODE_SIGNING_ALLOWED_FOR_APPS)"
  444. XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
  445. )
  446. foreach(XCODE_RESOURCE LaunchScreen.storyboard Images.xcassets Settings.bundle vcmi_logo.png)
  447. set(XCODE_RESOURCE_PATH ios/${XCODE_RESOURCE})
  448. target_sources(vcmiclient PRIVATE ${XCODE_RESOURCE_PATH})
  449. set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
  450. # workaround to prevent CMAKE_SKIP_PRECOMPILE_HEADERS being added as compile flag
  451. if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0" AND CMAKE_VERSION VERSION_LESS "3.25.0")
  452. set_source_files_properties(${XCODE_RESOURCE_PATH} PROPERTIES LANGUAGE CXX)
  453. endif()
  454. endforeach()
  455. set(CMAKE_EXE_LINKER_FLAGS "-Wl,-e,_client_main")
  456. endif()
  457. target_link_libraries(vcmiclient PRIVATE vcmiservercommon)
  458. if(ENABLE_SINGLE_APP_BUILD AND ENABLE_LAUNCHER)
  459. target_link_libraries(vcmiclient PRIVATE vcmilauncher)
  460. endif()
  461. target_link_libraries(vcmiclient PRIVATE
  462. vcmi SDL2::SDL2 SDL2::Image SDL2::Mixer SDL2::TTF
  463. )
  464. if(ffmpeg_LIBRARIES)
  465. target_link_libraries(vcmiclient PRIVATE
  466. ${ffmpeg_LIBRARIES}
  467. )
  468. else()
  469. target_compile_definitions(vcmiclient PRIVATE DISABLE_VIDEO)
  470. endif()
  471. target_include_directories(vcmiclient PUBLIC
  472. ${CMAKE_CURRENT_SOURCE_DIR}
  473. )
  474. if (ffmpeg_INCLUDE_DIRS)
  475. target_include_directories(vcmiclient PRIVATE
  476. ${ffmpeg_INCLUDE_DIRS}
  477. )
  478. endif()
  479. vcmi_set_output_dir(vcmiclient "")
  480. enable_pch(vcmiclient)
  481. if(APPLE_IOS)
  482. vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}")
  483. add_custom_command(TARGET vcmiclient POST_BUILD
  484. COMMAND ios/set_build_version.sh "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
  485. COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --component "${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME}" --config "$<CONFIG>" --prefix "$<TARGET_BUNDLE_CONTENT_DIR:vcmiclient>"
  486. COMMAND ios/rpath_remove_symlinks.sh
  487. COMMAND ios/codesign.sh
  488. WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  489. )
  490. install(TARGETS vcmiclient DESTINATION Payload COMPONENT app) # for ipa generation with cpack
  491. elseif(ANDROID)
  492. find_program(androidDeployQt androiddeployqt
  493. PATHS "${qtBinDir}"
  494. )
  495. vcmi_install_conan_deps("\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
  496. add_custom_target(android_deploy ALL
  497. COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --config "$<CONFIG>" --prefix "${androidQtBuildDir}"
  498. COMMAND "${androidDeployQt}" --input "${CMAKE_BINARY_DIR}/androiddeployqt.json" --output "${androidQtBuildDir}" --android-platform "android-${ANDROID_TARGET_SDK_VERSION}" --verbose $<$<NOT:$<CONFIG:Debug>>:--release> ${ANDROIDDEPLOYQT_OPTIONS}
  499. COMMAND_EXPAND_LISTS
  500. VERBATIM
  501. COMMENT "Create android package"
  502. )
  503. add_dependencies(android_deploy vcmiclient)
  504. else()
  505. install(TARGETS vcmiclient DESTINATION ${BIN_DIR})
  506. endif()
  507. #install icons and desktop file on Linux
  508. if(NOT WIN32 AND NOT APPLE AND NOT ANDROID)
  509. #FIXME: move to client makefile?
  510. foreach(iconSize 16 22 32 48 64 128 256 512 1024 2048)
  511. install(FILES "icons/vcmiclient.${iconSize}x${iconSize}.png"
  512. DESTINATION "share/icons/hicolor/${iconSize}x${iconSize}/apps"
  513. RENAME vcmiclient.png
  514. )
  515. endforeach()
  516. install(FILES icons/vcmiclient.svg
  517. DESTINATION share/icons/hicolor/scalable/apps
  518. RENAME vcmiclient.svg
  519. )
  520. install(FILES icons/vcmiclient.desktop
  521. DESTINATION share/applications
  522. )
  523. endif()