2
0

CMakePresets.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  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. "FORCE_BUNDLED_MINIZIP": "OFF"
  15. }
  16. },
  17. {
  18. "name": "base-release",
  19. "inherits": "release-binary-dir",
  20. "hidden": true,
  21. "cacheVariables": {
  22. "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
  23. "PACKAGE_FILE_NAME" : "$env{VCMI_PACKAGE_FILE_NAME}",
  24. "PACKAGE_NAME_SUFFIX" : "$env{VCMI_PACKAGE_NAME_SUFFIX}",
  25. "CMAKE_BUILD_TYPE": "RelWithDebInfo",
  26. "ENABLE_TEST": "OFF",
  27. "ENABLE_STRICT_COMPILATION": "ON",
  28. "ENABLE_GOLDMASTER": "$env{VCMI_PACKAGE_GOLDMASTER}",
  29. "ENABLE_PCH" : "OFF"
  30. }
  31. },
  32. {
  33. "name": "default-release",
  34. "inherits": "base-release",
  35. "hidden": true,
  36. "generator": "Ninja",
  37. "cacheVariables": {
  38. "FORCE_BUNDLED_FL": "OFF"
  39. }
  40. },
  41. {
  42. "name" : "linux-release",
  43. "inherits" : "default-release",
  44. "hidden": true,
  45. "cacheVariables": {
  46. "CMAKE_INSTALL_PREFIX" : "/usr/local"
  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. }
  68. },
  69. {
  70. "name": "linux-clang-release-ccache",
  71. "displayName": "Clang x86_64-pc-linux-gnu with ccache",
  72. "description": "VCMI Linux Clang with ccache",
  73. "inherits": "linux-release",
  74. "cacheVariables": {
  75. "ENABLE_CCACHE": "ON"
  76. }
  77. },
  78. {
  79. "name": "linux-gcc-release",
  80. "displayName": "GCC x86_64-pc-linux-gnu",
  81. "description": "VCMI Linux GCC",
  82. "inherits": "linux-release",
  83. "cacheVariables": {
  84. "ENABLE_LUA" : "ON",
  85. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  86. "CMAKE_CXX_COMPILER": "/usr/bin/g++"
  87. }
  88. },
  89. {
  90. "name": "linux-gcc-release-ccache",
  91. "displayName": "GCC x86_64-pc-linux-gnu with ccache",
  92. "description": "VCMI Linux GCC with ccache",
  93. "inherits": "linux-release",
  94. "cacheVariables": {
  95. "ENABLE_CCACHE": "ON"
  96. }
  97. },
  98. {
  99. "name": "linux-gcc-debug",
  100. "displayName": "GCC x86_64-pc-linux-gnu (debug)",
  101. "description": "VCMI Linux GCC (Debug)",
  102. "inherits": "linux-release",
  103. "cacheVariables": {
  104. "CMAKE_BUILD_TYPE": "Debug",
  105. "ENABLE_LUA" : "ON",
  106. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  107. "CMAKE_CXX_COMPILER": "/usr/bin/g++"
  108. }
  109. },
  110. {
  111. "name": "linux-clang-test",
  112. "displayName": "Clang x86_64-pc-linux-gnu with unit testing",
  113. "description": "VCMI Linux Clang",
  114. "inherits": "linux-test",
  115. "cacheVariables": {
  116. "CMAKE_C_COMPILER": "/usr/bin/clang",
  117. "CMAKE_CXX_COMPILER": "/usr/bin/clang++"
  118. }
  119. },
  120. {
  121. "name": "linux-gcc-test",
  122. "displayName": "GCC x86_64-pc-linux-gnu with unit testing",
  123. "description": "VCMI Linux GCC",
  124. "inherits": "linux-test",
  125. "cacheVariables": {
  126. "ENABLE_LUA" : "OFF",
  127. "CMAKE_C_COMPILER": "/usr/bin/gcc",
  128. "CMAKE_CXX_COMPILER": "/usr/bin/g++"
  129. }
  130. },
  131. {
  132. "name": "windows-mingw-release",
  133. "displayName": "Windows x64 MinGW Release",
  134. "description": "VCMI Windows Ninja using MinGW",
  135. "inherits": "default-release",
  136. "cacheVariables": {
  137. "CMAKE_BUILD_TYPE": "Release"
  138. }
  139. },
  140. {
  141. "name": "windows-msvc-release",
  142. "displayName": "Windows x64 RelWithDebInfo",
  143. "description": "VCMI RelWithDebInfo build",
  144. "inherits": "default-release",
  145. "generator": "Visual Studio 17 2022",
  146. "architecture": {
  147. "value": "x64",
  148. "strategy": "set"
  149. },
  150. "cacheVariables": {
  151. "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
  152. "CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
  153. "FORCE_BUNDLED_MINIZIP": "ON"
  154. }
  155. },
  156. {
  157. "name": "windows-msvc-release-ccache",
  158. "displayName": "Windows x64 RelWithDebInfo with ccache",
  159. "description": "VCMI RelWithDebInfo build with ccache",
  160. "inherits": "windows-msvc-release",
  161. "cacheVariables": {
  162. "ENABLE_CCACHE": "ON"
  163. }
  164. },
  165. {
  166. "name": "windows-mingw-conan-linux",
  167. "displayName": "Ninja+Conan release",
  168. "description": "VCMI Windows Ninja using Conan on Linux",
  169. "inherits": [
  170. "build-with-conan",
  171. "default-release"
  172. ],
  173. "cacheVariables": {
  174. "CMAKE_BUILD_TYPE": "Release",
  175. "FORCE_BUNDLED_FL": "ON"
  176. }
  177. },
  178. {
  179. "name": "macos-ninja-release",
  180. "displayName": "Ninja release",
  181. "description": "VCMI MacOS Ninja",
  182. "inherits": "default-release"
  183. },
  184. {
  185. "name": "macos-conan-ninja-release",
  186. "displayName": "Ninja+Conan release",
  187. "description": "VCMI MacOS Ninja using Conan",
  188. "inherits": [
  189. "build-with-conan",
  190. "default-release"
  191. ],
  192. "cacheVariables": {
  193. "CMAKE_BUILD_TYPE": "Release"
  194. }
  195. },
  196. {
  197. "name": "macos-arm-conan-ninja-release",
  198. "displayName": "Ninja+Conan arm64 release",
  199. "description": "VCMI MacOS-arm64 Ninja using Conan",
  200. "inherits": "macos-conan-ninja-release"
  201. },
  202. {
  203. "name": "macos-xcode-release",
  204. "displayName": "XCode release",
  205. "description": "VCMI MacOS Xcode",
  206. "inherits": "default-release",
  207. "generator": "Xcode"
  208. },
  209. {
  210. "name": "ios-device",
  211. "displayName": "Base iOS device",
  212. "description": "Base VCMI preset for iOS device",
  213. "generator": "Xcode",
  214. "binaryDir": "../build-${presetName}",
  215. "cacheVariables": {
  216. "CMAKE_SYSTEM_NAME": "iOS",
  217. "FORCE_BUNDLED_FL": "ON",
  218. "FORCE_BUNDLED_MINIZIP": "ON",
  219. "ENABLE_EDITOR" : "OFF"
  220. }
  221. },
  222. {
  223. "name": "ios-simulator",
  224. "displayName": "Base iOS simulator",
  225. "description": "Base VCMI preset for iOS simulator",
  226. "inherits": "ios-device",
  227. "cacheVariables": {
  228. "CMAKE_OSX_SYSROOT": "iphonesimulator"
  229. }
  230. },
  231. {
  232. "name": "ios-device-conan",
  233. "displayName": "Base iOS device using Conan",
  234. "description": "Base VCMI preset for iOS device using Conan",
  235. "inherits": [
  236. "build-with-conan",
  237. "ios-device"
  238. ]
  239. },
  240. {
  241. "name": "base-ios-release",
  242. "displayName": "Base iOS release",
  243. "description": "Base VCMI preset for iOS release",
  244. "inherits": "base-release",
  245. "hidden": true,
  246. "cacheVariables": {
  247. "BUNDLE_IDENTIFIER_PREFIX": "eu.vcmi"
  248. }
  249. },
  250. {
  251. "name": "ios-release-conan",
  252. "displayName": "iOS+Conan release",
  253. "description": "VCMI iOS release using Conan",
  254. "inherits": [
  255. "base-ios-release",
  256. "ios-device-conan"
  257. ],
  258. "cacheVariables": {
  259. "ENABLE_PCH" : "ON"
  260. }
  261. },
  262. {
  263. "name": "ios-release-conan-ccache",
  264. "displayName": "iOS+Conan release using ccache",
  265. "description": "VCMI iOS release using Conan and ccache",
  266. "inherits": "ios-release-conan",
  267. "cacheVariables": {
  268. "ENABLE_PCH" : "OFF",
  269. "ENABLE_CCACHE": "ON"
  270. }
  271. },
  272. {
  273. "name": "ios-release-legacy",
  274. "displayName": "iOS release using legacy dependencies",
  275. "description": "VCMI iOS release using legacy dependencies",
  276. "inherits": [
  277. "base-ios-release",
  278. "ios-device"
  279. ],
  280. "cacheVariables": {
  281. "CMAKE_PREFIX_PATH": "${sourceDir}/build/iphoneos"
  282. }
  283. },
  284. {
  285. "name": "android-conan-ninja-release",
  286. "displayName": "Android release",
  287. "description": "VCMI Android Ninja using Conan",
  288. "inherits": [
  289. "build-with-conan",
  290. "default-release"
  291. ],
  292. "cacheVariables": {
  293. "CMAKE_BUILD_TYPE": "RelWithDebInfo",
  294. "ANDROIDDEPLOYQT_OPTIONS" : "--aab"
  295. }
  296. },
  297. {
  298. "name": "android-daily-release",
  299. "displayName": "Android daily release",
  300. "description": "VCMI Android daily build",
  301. "inherits": "android-conan-ninja-release",
  302. "cacheVariables": {
  303. "ANDROID_GRADLE_PROPERTIES": "applicationIdSuffix=.daily;signingConfig=dailySigning;applicationLabel=VCMI daily"
  304. }
  305. }
  306. ],
  307. "buildPresets": [
  308. {
  309. "name": "default-release",
  310. "hidden": true,
  311. "configuration": "RelWithDebInfo"
  312. },
  313. {
  314. "name": "default-debug",
  315. "hidden": true,
  316. "configuration": "Debug"
  317. },
  318. {
  319. "name": "linux-clang-release",
  320. "configurePreset": "linux-clang-release",
  321. "inherits": "default-release"
  322. },
  323. {
  324. "name": "linux-clang-release-ccache",
  325. "configurePreset": "linux-clang-release-ccache",
  326. "inherits": "linux-clang-release"
  327. },
  328. {
  329. "name": "linux-clang-test",
  330. "configurePreset": "linux-clang-test",
  331. "inherits": "default-release"
  332. },
  333. {
  334. "name": "linux-gcc-test",
  335. "configurePreset": "linux-gcc-test",
  336. "inherits": "default-release"
  337. },
  338. {
  339. "name": "linux-gcc-release",
  340. "configurePreset": "linux-gcc-release",
  341. "inherits": "default-release"
  342. },
  343. {
  344. "name": "linux-gcc-release-ccache",
  345. "configurePreset": "linux-gcc-release-ccache",
  346. "inherits": "linux-gcc-release"
  347. },
  348. {
  349. "name": "linux-gcc-debug",
  350. "configurePreset": "linux-gcc-debug",
  351. "inherits": "default-debug"
  352. },
  353. {
  354. "name": "macos-xcode-release",
  355. "configurePreset": "macos-xcode-release",
  356. "inherits": "default-release"
  357. },
  358. {
  359. "name": "macos-ninja-release",
  360. "configurePreset": "macos-ninja-release",
  361. "inherits": "default-release"
  362. },
  363. {
  364. "name": "macos-conan-ninja-release",
  365. "configurePreset": "macos-conan-ninja-release",
  366. "inherits": "default-release"
  367. },
  368. {
  369. "name": "macos-arm-conan-ninja-release",
  370. "configurePreset": "macos-arm-conan-ninja-release",
  371. "inherits": "default-release"
  372. },
  373. {
  374. "name": "windows-mingw-release",
  375. "configurePreset": "windows-mingw-release",
  376. "inherits": "default-release"
  377. },
  378. {
  379. "name": "windows-msvc-release",
  380. "configurePreset": "windows-msvc-release",
  381. "inherits": "default-release"
  382. },
  383. {
  384. "name": "windows-msvc-release-ccache",
  385. "configurePreset": "windows-msvc-release-ccache",
  386. "inherits": "windows-msvc-release"
  387. },
  388. {
  389. "name": "windows-msvc-relwithdebinfo",
  390. "configurePreset": "windows-msvc-release",
  391. "inherits": "default-release"
  392. },
  393. {
  394. "name": "windows-mingw-conan-linux",
  395. "configurePreset": "windows-mingw-conan-linux",
  396. "inherits": "default-release",
  397. "configuration": "Release"
  398. },
  399. {
  400. "name": "ios-release-conan",
  401. "configurePreset": "ios-release-conan",
  402. "inherits": "default-release",
  403. "configuration": "Release",
  404. "targets": ["vcmiclient"],
  405. "nativeToolOptions": [
  406. "CODE_SIGNING_ALLOWED_FOR_APPS=NO"
  407. ]
  408. },
  409. {
  410. "name": "ios-release-conan-ccache",
  411. "configurePreset": "ios-release-conan-ccache",
  412. "inherits": "ios-release-conan"
  413. },
  414. {
  415. "name": "ios-release-legacy",
  416. "configurePreset": "ios-release-legacy",
  417. "inherits": "ios-release-conan"
  418. },
  419. {
  420. "name": "android-conan-ninja-release",
  421. "configurePreset": "android-conan-ninja-release",
  422. "inherits": "default-release"
  423. },
  424. {
  425. "name": "android-daily-release",
  426. "configurePreset": "android-daily-release",
  427. "inherits": "android-conan-ninja-release"
  428. }
  429. ],
  430. "testPresets": [
  431. {
  432. "name": "default-release",
  433. "hidden": true,
  434. "output": {
  435. "shortProgress": true,
  436. "verbosity": "verbose"
  437. }
  438. },
  439. {
  440. "name": "linux-clang-release",
  441. "configurePreset": "linux-clang-release",
  442. "inherits": "default-release"
  443. },
  444. {
  445. "name": "linux-gcc-release",
  446. "configurePreset": "linux-gcc-release",
  447. "inherits": "default-release"
  448. },
  449. {
  450. "name": "linux-clang-test",
  451. "configurePreset": "linux-clang-test",
  452. "inherits": "default-release"
  453. },
  454. {
  455. "name": "linux-gcc-test",
  456. "configurePreset": "linux-gcc-test",
  457. "inherits": "default-release"
  458. },
  459. {
  460. "name": "macos-xcode-release",
  461. "configurePreset": "macos-xcode-release",
  462. "inherits": "default-release"
  463. },
  464. {
  465. "name": "macos-ninja-release",
  466. "configurePreset": "macos-ninja-release",
  467. "inherits": "default-release"
  468. },
  469. {
  470. "name": "windows-mingw-release",
  471. "configurePreset": "windows-mingw-release",
  472. "inherits": "default-release"
  473. },
  474. {
  475. "name": "windows-msvc-release",
  476. "configurePreset": "windows-msvc-release",
  477. "inherits": "default-release"
  478. },
  479. {
  480. "name": "windows-mingw-conan-linux",
  481. "configurePreset": "windows-mingw-conan-linux",
  482. "inherits": "default-release"
  483. }
  484. ]
  485. }