CMakePresets.json 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. {
  2. "version": 2,
  3. "configurePresets": [
  4. {
  5. "name": "release-binary-dir",
  6. "hidden": true,
  7. "binaryDir": "${sourceDir}/out/build/${presetName}"
  8. },
  9. {
  10. "name": "build-with-conan",
  11. "hidden": true,
  12. "cacheVariables": {
  13. "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/conan-generated/conan_toolchain.cmake"
  14. }
  15. },
  16. {
  17. "name": "base-release",
  18. "inherits": "release-binary-dir",
  19. "hidden": true,
  20. "cacheVariables": {
  21. "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
  22. "PACKAGE_FILE_NAME" : "$env{VCMI_PACKAGE_FILE_NAME}",
  23. "PACKAGE_NAME_SUFFIX" : "$env{VCMI_PACKAGE_NAME_SUFFIX}",
  24. "CMAKE_BUILD_TYPE": "RelWithDebInfo",
  25. "ENABLE_TEST": "OFF",
  26. "ENABLE_STRICT_COMPILATION": "ON",
  27. "ENABLE_GOLDMASTER": "$env{VCMI_PACKAGE_GOLDMASTER}",
  28. "ENABLE_PCH" : "OFF"
  29. }
  30. },
  31. {
  32. "name": "default-release",
  33. "inherits": "base-release",
  34. "hidden": true,
  35. "generator": "Ninja",
  36. "cacheVariables": {
  37. "FORCE_BUNDLED_FL": "OFF"
  38. }
  39. },
  40. {
  41. "name" : "linux-release",
  42. "inherits" : "default-release",
  43. "hidden": true,
  44. "cacheVariables": {
  45. "CMAKE_INSTALL_PREFIX" : "/usr/local",
  46. "ONNXRUNTIME_ROOT": "/opt/onnxruntime"
  47. }
  48. },
  49. {
  50. "name": "linux-test",
  51. "inherits": "linux-release",
  52. "hidden": true,
  53. "cacheVariables": {
  54. "ENABLE_LOBBY": "ON",
  55. "ENABLE_TEST": "ON",
  56. "ENABLE_LUA": "ON"
  57. }
  58. },
  59. {
  60. "name": "linux-clang-release",
  61. "displayName": "Clang x86_64-pc-linux-gnu",
  62. "description": "VCMI Linux Clang",
  63. "inherits": "linux-release",
  64. "cacheVariables": {
  65. "CMAKE_C_COMPILER": "/usr/bin/clang",
  66. "CMAKE_CXX_COMPILER": "/usr/bin/clang++",
  67. "ENABLE_DISCORD": "OFF"
  68. }
  69. },
  70. {
  71. "name": "linux-clang-release-ccache",
  72. "displayName": "Clang x86_64-pc-linux-gnu with ccache",
  73. "description": "VCMI Linux Clang with ccache",
  74. "inherits": "linux-release",
  75. "cacheVariables": {
  76. "ENABLE_CCACHE": "ON",
  77. "ENABLE_DISCORD": "OFF"
  78. }
  79. },
  80. {
  81. "name": "linux-gcc-release",
  82. "displayName": "GCC x86_64-pc-linux-gnu",
  83. "description": "VCMI Linux GCC",
  84. "inherits": "linux-release",
  85. "cacheVariables": {
  86. "ENABLE_LUA" : "ON",
  87. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  88. "CMAKE_CXX_COMPILER": "/usr/bin/g++"
  89. }
  90. },
  91. {
  92. "name": "linux-gcc-release-appimage",
  93. "displayName": "GCC x86_64-pc-linux-gnu for appimage",
  94. "description": "VCMI Linux GCC",
  95. "inherits": "linux-release",
  96. "cacheVariables": {
  97. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  98. "CMAKE_CXX_COMPILER": "/usr/bin/g++",
  99. "ENABLE_STATIC_LIBS": "ON"
  100. }
  101. },
  102. {
  103. "name": "linux-gcc-release-arm64-appimage",
  104. "displayName": "GCC aarch64-linux-gnu for appimage",
  105. "description": "VCMI Linux GCC ARM64",
  106. "inherits": "linux-release",
  107. "cacheVariables": {
  108. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  109. "CMAKE_CXX_COMPILER": "/usr/bin/g++",
  110. "ENABLE_STATIC_LIBS": "ON"
  111. }
  112. },
  113. {
  114. "name": "linux-gcc-release-ccache",
  115. "displayName": "GCC x86_64-pc-linux-gnu with ccache",
  116. "description": "VCMI Linux GCC with ccache",
  117. "inherits": "linux-release",
  118. "cacheVariables": {
  119. "ENABLE_CCACHE": "ON"
  120. }
  121. },
  122. {
  123. "name": "linux-gcc-debug",
  124. "displayName": "GCC x86_64-pc-linux-gnu (debug)",
  125. "description": "VCMI Linux GCC (Debug)",
  126. "inherits": "linux-test",
  127. "cacheVariables": {
  128. "CMAKE_BUILD_TYPE": "Debug",
  129. "ENABLE_LUA" : "ON",
  130. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  131. "CMAKE_CXX_COMPILER": "/usr/bin/g++"
  132. }
  133. },
  134. {
  135. "name": "linux-clang-debug",
  136. "displayName": "Clang x86_64-pc-linux-gnu (debug)",
  137. "description": "VCMI Linux Clang (Debug)",
  138. "inherits": "linux-test",
  139. "cacheVariables": {
  140. "CMAKE_BUILD_TYPE": "Debug",
  141. "ENABLE_LUA" : "ON",
  142. "CMAKE_C_COMPILER": "/usr/bin/clang",
  143. "CMAKE_CXX_COMPILER": "/usr/bin/clang++",
  144. "ENABLE_DISCORD": "OFF"
  145. }
  146. },
  147. {
  148. "name": "linux-clang-test",
  149. "displayName": "Clang x86_64-pc-linux-gnu with unit testing",
  150. "description": "VCMI Linux Clang",
  151. "inherits": "linux-test",
  152. "cacheVariables": {
  153. "CMAKE_C_COMPILER": "/usr/bin/clang",
  154. "CMAKE_CXX_COMPILER": "/usr/bin/clang++",
  155. "ENABLE_DISCORD": "OFF"
  156. }
  157. },
  158. {
  159. "name": "linux-gcc-test",
  160. "displayName": "GCC x86_64-pc-linux-gnu with unit testing",
  161. "description": "VCMI Linux GCC",
  162. "inherits": "linux-test",
  163. "cacheVariables": {
  164. "ENABLE_LUA" : "OFF",
  165. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  166. "CMAKE_CXX_COMPILER": "/usr/bin/g++"
  167. }
  168. },
  169. {
  170. "name": "windows-mingw-release",
  171. "displayName": "Windows x64 MinGW Release",
  172. "description": "VCMI Windows Ninja using MinGW",
  173. "inherits": "default-release",
  174. "cacheVariables": {
  175. "CMAKE_BUILD_TYPE": "Release",
  176. "CMAKE_C_COMPILER": "gcc",
  177. "CMAKE_CXX_COMPILER": "g++"
  178. }
  179. },
  180. {
  181. "name": "windows-msvc-release",
  182. "displayName": "Windows x64 RelWithDebInfo",
  183. "description": "VCMI RelWithDebInfo build",
  184. "inherits": [
  185. "build-with-conan",
  186. "default-release"
  187. ],
  188. "generator": "Visual Studio 17 2022",
  189. "architecture": {
  190. "value": "x64",
  191. "strategy": "set"
  192. },
  193. "cacheVariables": {
  194. "CMAKE_POLICY_DEFAULT_CMP0091": "NEW"
  195. }
  196. },
  197. {
  198. "name": "windows-msvc-release-x86",
  199. "displayName": "Windows x86 RelWithDebInfo",
  200. "description": "VCMI RelWithDebInfo build",
  201. "inherits": [
  202. "build-with-conan",
  203. "default-release"
  204. ],
  205. "generator": "Visual Studio 17 2022",
  206. "cacheVariables": {
  207. "CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
  208. "CMAKE_GENERATOR_PLATFORM": "WIN32"
  209. }
  210. },
  211. {
  212. "name": "windows-msvc-release-arm64",
  213. "displayName": "Windows ARM64 RelWithDebInfo",
  214. "description": "VCMI Windows ARM64 build",
  215. "inherits": [
  216. "build-with-conan",
  217. "default-release"
  218. ],
  219. "generator": "Visual Studio 17 2022",
  220. "architecture": {
  221. "value": "ARM64",
  222. "strategy": "set"
  223. },
  224. "cacheVariables": {
  225. "CMAKE_POLICY_DEFAULT_CMP0091": "NEW"
  226. }
  227. },
  228. {
  229. "name": "windows-msvc-release-ccache",
  230. "displayName": "Windows x64 RelWithDebInfo with ccache",
  231. "description": "VCMI RelWithDebInfo build with ccache",
  232. "inherits": "windows-msvc-release",
  233. "cacheVariables": {
  234. "ENABLE_CCACHE": "ON"
  235. }
  236. },
  237. {
  238. "name": "windows-msvc-ninja-release",
  239. "displayName": "Windows x64 RelWithDebInfo (Ninja)",
  240. "description": "VCMI RelWithDebInfo build using Ninja + sccache",
  241. "inherits": [
  242. "build-with-conan",
  243. "default-release"
  244. ],
  245. "generator": "Ninja",
  246. "cacheVariables": {
  247. "CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
  248. "ENABLE_CCACHE": "ON",
  249. "CMAKE_C_COMPILER_LAUNCHER": "sccache",
  250. "CMAKE_CXX_COMPILER_LAUNCHER": "sccache",
  251. "CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "Embedded",
  252. "ENABLE_MULTI_PROCESS_BUILDS": "OFF",
  253. "CMAKE_BUILD_TYPE": "RelWithDebInfo",
  254. "CMAKE_C_FLAGS_RELWITHDEBINFO": "/O2 /Ob1 /DNDEBUG /Z7",
  255. "CMAKE_CXX_FLAGS_RELWITHDEBINFO": "/O2 /Ob1 /DNDEBUG /Z7"
  256. }
  257. },
  258. {
  259. "name": "windows-msvc-ninja-release-x86",
  260. "displayName": "Windows x86 RelWithDebInfo (Ninja)",
  261. "description": "VCMI RelWithDebInfo build using Ninja + sccache (x86)",
  262. "inherits": "windows-msvc-ninja-release"
  263. },
  264. {
  265. "name": "windows-msvc-ninja-release-arm64",
  266. "displayName": "Windows ARM64 RelWithDebInfo (Ninja)",
  267. "description": "VCMI RelWithDebInfo build using Ninja + sccache (ARM64)",
  268. "inherits": "windows-msvc-ninja-release"
  269. },
  270. {
  271. "name": "macos-ninja-release",
  272. "displayName": "Ninja release",
  273. "description": "VCMI MacOS Ninja",
  274. "inherits": "default-release"
  275. },
  276. {
  277. "name": "macos-conan-ninja-release",
  278. "displayName": "Ninja+Conan release",
  279. "description": "VCMI MacOS Ninja using Conan",
  280. "inherits": [
  281. "build-with-conan",
  282. "default-release"
  283. ],
  284. "cacheVariables": {
  285. "CMAKE_BUILD_TYPE": "Release"
  286. }
  287. },
  288. {
  289. "name": "macos-arm-conan-ninja-release",
  290. "displayName": "Ninja+Conan arm64 release",
  291. "description": "VCMI MacOS-arm64 Ninja using Conan",
  292. "inherits": "macos-conan-ninja-release"
  293. },
  294. {
  295. "name": "macos-xcode-release",
  296. "displayName": "XCode release",
  297. "description": "VCMI MacOS Xcode",
  298. "inherits": "default-release",
  299. "generator": "Xcode"
  300. },
  301. {
  302. "name": "ios-device-conan",
  303. "displayName": "Base iOS device using Conan",
  304. "description": "Base VCMI preset for iOS device using Conan",
  305. "inherits": [
  306. "build-with-conan"
  307. ],
  308. "generator": "Xcode",
  309. "binaryDir": "../build-${presetName}",
  310. "cacheVariables": {
  311. "CMAKE_SYSTEM_NAME": "iOS",
  312. "FORCE_BUNDLED_FL": "ON",
  313. "ENABLE_EDITOR" : "OFF"
  314. }
  315. },
  316. {
  317. "name": "base-ios-release",
  318. "displayName": "Base iOS release",
  319. "description": "Base VCMI preset for iOS release",
  320. "inherits": "base-release",
  321. "hidden": true,
  322. "cacheVariables": {
  323. "BUNDLE_IDENTIFIER_PREFIX": "eu.vcmi"
  324. }
  325. },
  326. {
  327. "name": "ios-release-conan",
  328. "displayName": "iOS+Conan release",
  329. "description": "VCMI iOS release using Conan",
  330. "inherits": [
  331. "base-ios-release",
  332. "ios-device-conan"
  333. ],
  334. "cacheVariables": {
  335. "ENABLE_PCH" : "ON"
  336. }
  337. },
  338. {
  339. "name": "ios-release-conan-ccache",
  340. "displayName": "iOS+Conan release using ccache",
  341. "description": "VCMI iOS release using Conan and ccache",
  342. "inherits": "ios-release-conan",
  343. "cacheVariables": {
  344. "ENABLE_PCH" : "OFF",
  345. "ENABLE_CCACHE": "ON"
  346. }
  347. },
  348. {
  349. "name": "android-conan-ninja-release",
  350. "displayName": "Android release",
  351. "description": "VCMI Android Ninja using Conan",
  352. "inherits": [
  353. "build-with-conan",
  354. "default-release"
  355. ],
  356. "cacheVariables": {
  357. "CMAKE_BUILD_TYPE": "RelWithDebInfo",
  358. "ANDROIDDEPLOYQT_OPTIONS" : "--aab"
  359. }
  360. },
  361. {
  362. "name": "android-daily-release",
  363. "displayName": "Android daily release",
  364. "description": "VCMI Android daily build",
  365. "inherits": "android-conan-ninja-release",
  366. "cacheVariables": {
  367. "ANDROID_GRADLE_PROPERTIES": "applicationIdSuffix=.daily;signingConfig=dailySigning;applicationLabel=VCMI daily;applicationVariant=daily"
  368. }
  369. },
  370. {
  371. "name": "portmaster-release",
  372. "displayName": "PortMaster",
  373. "description": "VCMI PortMaster",
  374. "inherits": "default-release",
  375. "cacheVariables": {
  376. "CMAKE_BUILD_TYPE": "Release",
  377. "CMAKE_INSTALL_PREFIX": ".",
  378. "ENABLE_DEBUG_CONSOLE": "OFF",
  379. "ENABLE_EDITOR": "OFF",
  380. "ENABLE_GITVERSION": "OFF",
  381. "ENABLE_LAUNCHER": "OFF",
  382. "ENABLE_SERVER": "OFF",
  383. "ENABLE_TRANSLATIONS": "OFF",
  384. "FORCE_BUNDLED_FL": "ON",
  385. "ENABLE_GOLDMASTER": "ON",
  386. "VCMI_PORTMASTER": "ON"
  387. }
  388. }
  389. ],
  390. "buildPresets": [
  391. {
  392. "name": "default-release",
  393. "hidden": true,
  394. "configuration": "RelWithDebInfo"
  395. },
  396. {
  397. "name": "default-debug",
  398. "hidden": true,
  399. "configuration": "Debug"
  400. },
  401. {
  402. "name": "linux-clang-release",
  403. "configurePreset": "linux-clang-release",
  404. "inherits": "default-release"
  405. },
  406. {
  407. "name": "linux-clang-release-ccache",
  408. "configurePreset": "linux-clang-release-ccache",
  409. "inherits": "linux-clang-release"
  410. },
  411. {
  412. "name": "linux-clang-test",
  413. "configurePreset": "linux-clang-test",
  414. "inherits": "default-release"
  415. },
  416. {
  417. "name": "linux-gcc-test",
  418. "configurePreset": "linux-gcc-test",
  419. "inherits": "default-release"
  420. },
  421. {
  422. "name": "linux-gcc-release",
  423. "configurePreset": "linux-gcc-release",
  424. "inherits": "default-release"
  425. },
  426. {
  427. "name": "linux-gcc-release-appimage",
  428. "configurePreset": "linux-gcc-release-appimage",
  429. "inherits": "linux-gcc-release"
  430. },
  431. {
  432. "name": "linux-gcc-release-arm64-appimage",
  433. "configurePreset": "linux-gcc-release-arm64-appimage",
  434. "inherits": "linux-gcc-release"
  435. },
  436. {
  437. "name": "linux-gcc-release-ccache",
  438. "configurePreset": "linux-gcc-release-ccache",
  439. "inherits": "linux-gcc-release"
  440. },
  441. {
  442. "name": "linux-gcc-debug",
  443. "configurePreset": "linux-gcc-debug",
  444. "inherits": "default-debug"
  445. },
  446. {
  447. "name": "linux-clang-debug",
  448. "configurePreset": "linux-clang-debug",
  449. "inherits": "default-debug"
  450. },
  451. {
  452. "name": "macos-xcode-release",
  453. "configurePreset": "macos-xcode-release",
  454. "inherits": "default-release"
  455. },
  456. {
  457. "name": "macos-ninja-release",
  458. "configurePreset": "macos-ninja-release",
  459. "inherits": "default-release"
  460. },
  461. {
  462. "name": "macos-conan-ninja-release",
  463. "configurePreset": "macos-conan-ninja-release",
  464. "inherits": "default-release"
  465. },
  466. {
  467. "name": "macos-arm-conan-ninja-release",
  468. "configurePreset": "macos-arm-conan-ninja-release",
  469. "inherits": "default-release"
  470. },
  471. {
  472. "name": "windows-mingw-release",
  473. "configurePreset": "windows-mingw-release",
  474. "inherits": "default-release"
  475. },
  476. {
  477. "name": "windows-msvc-release",
  478. "configurePreset": "windows-msvc-release",
  479. "inherits": "default-release"
  480. },
  481. {
  482. "name": "windows-msvc-release-x86",
  483. "configurePreset": "windows-msvc-release-x86",
  484. "inherits": "default-release"
  485. },
  486. {
  487. "name": "windows-msvc-release-arm64",
  488. "configurePreset": "windows-msvc-release-arm64",
  489. "inherits": "default-release"
  490. },
  491. {
  492. "name": "windows-msvc-release-ccache",
  493. "configurePreset": "windows-msvc-release-ccache",
  494. "inherits": "windows-msvc-release"
  495. },
  496. {
  497. "name": "windows-msvc-relwithdebinfo",
  498. "configurePreset": "windows-msvc-release",
  499. "inherits": "default-release"
  500. },
  501. {
  502. "name": "windows-msvc-ninja-release",
  503. "configurePreset": "windows-msvc-ninja-release",
  504. "inherits": "default-release"
  505. },
  506. {
  507. "name": "windows-msvc-ninja-release-x86",
  508. "configurePreset": "windows-msvc-ninja-release-x86",
  509. "inherits": "default-release"
  510. },
  511. {
  512. "name": "windows-msvc-ninja-release-arm64",
  513. "configurePreset": "windows-msvc-ninja-release-arm64",
  514. "inherits": "default-release"
  515. },
  516. {
  517. "name": "ios-release-conan",
  518. "configurePreset": "ios-release-conan",
  519. "inherits": "default-release",
  520. "configuration": "RelWithDebInfo",
  521. "targets": ["vcmiclient"],
  522. "nativeToolOptions": [
  523. "CODE_SIGNING_ALLOWED_FOR_APPS=NO"
  524. ]
  525. },
  526. {
  527. "name": "ios-release-conan-ccache",
  528. "configurePreset": "ios-release-conan-ccache",
  529. "inherits": "ios-release-conan"
  530. },
  531. {
  532. "name": "android-conan-ninja-release",
  533. "configurePreset": "android-conan-ninja-release",
  534. "inherits": "default-release"
  535. },
  536. {
  537. "name": "android-daily-release",
  538. "configurePreset": "android-daily-release",
  539. "inherits": "android-conan-ninja-release"
  540. },
  541. {
  542. "name": "portmaster-release",
  543. "configurePreset": "portmaster-release",
  544. "inherits": "default-release",
  545. "configuration": "Release"
  546. }
  547. ],
  548. "testPresets": [
  549. {
  550. "name": "default-release",
  551. "hidden": true,
  552. "output": {
  553. "shortProgress": true,
  554. "verbosity": "verbose"
  555. }
  556. },
  557. {
  558. "name": "linux-clang-debug",
  559. "configurePreset": "linux-clang-debug",
  560. "inherits": "default-release"
  561. },
  562. {
  563. "name": "linux-clang-release",
  564. "configurePreset": "linux-clang-release",
  565. "inherits": "default-release"
  566. },
  567. {
  568. "name": "linux-clang-test",
  569. "configurePreset": "linux-clang-test",
  570. "inherits": "default-release"
  571. },
  572. {
  573. "name": "linux-gcc-debug",
  574. "configurePreset": "linux-gcc-debug",
  575. "inherits": "default-release"
  576. },
  577. {
  578. "name": "linux-gcc-release",
  579. "configurePreset": "linux-gcc-release",
  580. "inherits": "default-release"
  581. },
  582. {
  583. "name": "linux-gcc-test",
  584. "configurePreset": "linux-gcc-test",
  585. "inherits": "default-release"
  586. },
  587. {
  588. "name": "macos-xcode-release",
  589. "configurePreset": "macos-xcode-release",
  590. "inherits": "default-release"
  591. },
  592. {
  593. "name": "macos-ninja-release",
  594. "configurePreset": "macos-ninja-release",
  595. "inherits": "default-release"
  596. },
  597. {
  598. "name": "windows-mingw-release",
  599. "configurePreset": "windows-mingw-release",
  600. "inherits": "default-release"
  601. },
  602. {
  603. "name": "windows-msvc-release",
  604. "configurePreset": "windows-msvc-release",
  605. "inherits": "default-release"
  606. }
  607. ]
  608. }