sqlite3.gyp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {
  2. 'includes': [ 'common-sqlite.gypi' ],
  3. 'target_defaults': {
  4. 'default_configuration': 'Release',
  5. 'cflags':[
  6. '-std=c99'
  7. ],
  8. 'configurations': {
  9. 'Debug': {
  10. 'defines': [ 'DEBUG', '_DEBUG' ],
  11. 'msvs_settings': {
  12. 'VCCLCompilerTool': {
  13. 'RuntimeLibrary': 1, # static debug
  14. },
  15. },
  16. },
  17. 'Release': {
  18. 'defines': [ 'NDEBUG' ],
  19. 'msvs_settings': {
  20. 'VCCLCompilerTool': {
  21. 'RuntimeLibrary': 0, # static release
  22. },
  23. },
  24. }
  25. },
  26. 'msvs_settings': {
  27. 'VCCLCompilerTool': {
  28. },
  29. 'VCLibrarianTool': {
  30. },
  31. 'VCLinkerTool': {
  32. 'GenerateDebugInformation': 'true',
  33. },
  34. },
  35. 'conditions': [
  36. ['OS == "win"', {
  37. 'defines': [
  38. 'WIN32'
  39. ],
  40. }]
  41. ],
  42. },
  43. 'targets': [
  44. {
  45. 'target_name': 'action_before_build',
  46. 'type': 'none',
  47. 'hard_dependency': 1,
  48. 'actions': [
  49. {
  50. 'action_name': 'unpack_sqlite_dep',
  51. 'inputs': [
  52. './sqlite-autoconf-<@(sqlite_version).tar.gz'
  53. ],
  54. 'outputs': [
  55. '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c'
  56. ],
  57. 'action': ['python','./extract.py','./sqlite-autoconf-<@(sqlite_version).tar.gz','<(SHARED_INTERMEDIATE_DIR)']
  58. }
  59. ],
  60. 'direct_dependent_settings': {
  61. 'include_dirs': [
  62. '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/',
  63. ]
  64. },
  65. },
  66. {
  67. 'target_name': 'sqlite3',
  68. 'type': 'static_library',
  69. 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/' ],
  70. 'dependencies': [
  71. 'action_before_build'
  72. ],
  73. 'sources': [
  74. '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c'
  75. ],
  76. 'direct_dependent_settings': {
  77. 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/' ],
  78. 'defines': [
  79. 'SQLITE_THREADSAFE=1',
  80. 'SQLITE_ENABLE_FTS3',
  81. 'SQLITE_ENABLE_RTREE'
  82. ],
  83. },
  84. 'cflags_cc': [
  85. '-Wno-unused-value',
  86. '-include ../src/gcc-preinclude.h'
  87. ],
  88. 'defines': [
  89. '_REENTRANT=1',
  90. 'SQLITE_THREADSAFE=1',
  91. 'SQLITE_ENABLE_FTS3',
  92. 'SQLITE_ENABLE_RTREE'
  93. ],
  94. 'export_dependent_settings': [
  95. 'action_before_build',
  96. ]
  97. }
  98. ]
  99. }