genie.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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/**.cpp"),
  40. path.join(BX_DIR, "tests/**.H"),
  41. }
  42. configuration { "vs* or mingw*" }
  43. links {
  44. "psapi",
  45. }
  46. configuration { "android*" }
  47. targetextension ".so"
  48. linkoptions {
  49. "-shared",
  50. }
  51. configuration { "nacl or nacl-arm" }
  52. targetextension ".nexe"
  53. links {
  54. "ppapi",
  55. "pthread",
  56. }
  57. configuration { "pnacl" }
  58. targetextension ".pexe"
  59. links {
  60. "ppapi",
  61. "pthread",
  62. }
  63. configuration { "linux-*" }
  64. links {
  65. "pthread",
  66. }
  67. configuration { "osx" }
  68. links {
  69. "Cocoa.framework",
  70. }
  71. configuration {}
  72. strip()