genie.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. --
  2. -- Copyright 2010-2022 Branimir Karadzic. All rights reserved.
  3. -- License: https://github.com/bkaradzic/bx/blob/master/LICENSE
  4. --
  5. newoption {
  6. trigger = "with-amalgamated",
  7. description = "Enable amalgamated build.",
  8. }
  9. newoption {
  10. trigger = "with-crtnone",
  11. description = "Enable build without CRT.",
  12. }
  13. solution "bx"
  14. configurations {
  15. "Debug",
  16. "Release",
  17. }
  18. platforms {
  19. "x32",
  20. "x64",
  21. "Native", -- for targets where bitness is not specified
  22. }
  23. language "C++"
  24. BX_DIR = path.getabsolute("..")
  25. BX_BUILD_DIR = path.join(BX_DIR, ".build")
  26. BX_THIRD_PARTY_DIR = path.join(BX_DIR, "3rdparty")
  27. dofile "toolchain.lua"
  28. toolchain(BX_BUILD_DIR, BX_THIRD_PARTY_DIR)
  29. function copyLib()
  30. end
  31. dofile "bx.lua"
  32. dofile "bin2c.lua"
  33. dofile "lemon.lua"
  34. project "bx.test"
  35. kind "ConsoleApp"
  36. debugdir (path.join(BX_DIR, "tests"))
  37. removeflags {
  38. "NoExceptions",
  39. }
  40. includedirs {
  41. BX_THIRD_PARTY_DIR,
  42. }
  43. files {
  44. path.join(BX_DIR, "tests/*_test.cpp"),
  45. path.join(BX_DIR, "tests/*.h"),
  46. path.join(BX_DIR, "tests/dbg.*"),
  47. }
  48. using_bx()
  49. configuration { "vs* or mingw*" }
  50. links {
  51. "psapi",
  52. }
  53. configuration { "android*" }
  54. targetextension ".so"
  55. linkoptions {
  56. "-shared",
  57. }
  58. configuration { "linux-*" }
  59. links {
  60. "pthread",
  61. }
  62. configuration { "osx*" }
  63. links {
  64. "Cocoa.framework",
  65. }
  66. configuration {}
  67. strip()
  68. project "bx.bench"
  69. kind "ConsoleApp"
  70. debugdir (path.join(BX_DIR, "tests"))
  71. includedirs {
  72. path.join(BX_DIR, "include"),
  73. BX_THIRD_PARTY_DIR,
  74. }
  75. files {
  76. path.join(BX_DIR, "tests/*_bench.cpp"),
  77. path.join(BX_DIR, "tests/*_bench.h"),
  78. path.join(BX_DIR, "tests/dbg.*"),
  79. }
  80. links {
  81. "bx",
  82. }
  83. configuration { "vs* or mingw*" }
  84. links {
  85. "psapi",
  86. }
  87. configuration { "android*" }
  88. targetextension ".so"
  89. linkoptions {
  90. "-shared",
  91. }
  92. configuration { "linux-*" }
  93. links {
  94. "pthread",
  95. }
  96. configuration { "osx*" }
  97. links {
  98. "Cocoa.framework",
  99. }
  100. configuration { "Debug" }
  101. defines {
  102. "BX_CONFIG_DEBUG=1",
  103. }
  104. configuration { "Release" }
  105. defines {
  106. "BX_CONFIG_DEBUG=0",
  107. }
  108. configuration {}
  109. strip()