genie.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. --
  2. -- Copyright 2010-2016 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. configuration { "vs* or mingw*" }
  44. links {
  45. "psapi",
  46. }
  47. configuration { "android*" }
  48. targetextension ".so"
  49. linkoptions {
  50. "-shared",
  51. }
  52. configuration { "nacl or nacl-arm" }
  53. targetextension ".nexe"
  54. links {
  55. "ppapi",
  56. "pthread",
  57. }
  58. configuration { "pnacl" }
  59. targetextension ".pexe"
  60. links {
  61. "ppapi",
  62. "pthread",
  63. }
  64. configuration { "linux-*" }
  65. links {
  66. "pthread",
  67. }
  68. configuration { "osx" }
  69. links {
  70. "Cocoa.framework",
  71. }
  72. configuration {}
  73. strip()
  74. project "bx.bench"
  75. kind "ConsoleApp"
  76. debugdir (path.join(BX_DIR, "tests"))
  77. includedirs {
  78. path.join(BX_DIR, "include"),
  79. BX_THIRD_PARTY_DIR,
  80. }
  81. files {
  82. path.join(BX_DIR, "tests/*_bench.cpp"),
  83. path.join(BX_DIR, "tests/*_bench.h"),
  84. path.join(BX_DIR, "tests/dbg.*"),
  85. }
  86. configuration { "vs* or mingw*" }
  87. links {
  88. "psapi",
  89. }
  90. configuration { "android*" }
  91. targetextension ".so"
  92. linkoptions {
  93. "-shared",
  94. }
  95. configuration { "nacl or nacl-arm" }
  96. targetextension ".nexe"
  97. links {
  98. "ppapi",
  99. "pthread",
  100. }
  101. configuration { "pnacl" }
  102. targetextension ".pexe"
  103. links {
  104. "ppapi",
  105. "pthread",
  106. }
  107. configuration { "linux-*" }
  108. links {
  109. "pthread",
  110. }
  111. configuration { "osx" }
  112. links {
  113. "Cocoa.framework",
  114. }
  115. configuration {}
  116. strip()