genie.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 "unittest++.lua"
  28. dofile "bin2c.lua"
  29. project "bx.test"
  30. kind "ConsoleApp"
  31. debugdir (path.join(BX_DIR, "tests"))
  32. removeflags {
  33. "NoExceptions",
  34. }
  35. includedirs {
  36. path.join(BX_DIR, "include"),
  37. path.join(BX_THIRD_PARTY_DIR, "UnitTest++/src"),
  38. }
  39. links {
  40. "UnitTest++",
  41. }
  42. files {
  43. path.join(BX_DIR, "tests/**.cpp"),
  44. path.join(BX_DIR, "tests/**.H"),
  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()