genie.lua 2.2 KB

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