# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'use_system_sqlite%': 0, 'required_sqlite_version': '3.6.1', }, 'target_defaults': { 'defines': [ 'SQLITE_CORE', 'SQLITE_ENABLE_BROKEN_FTS2', 'SQLITE_ENABLE_FTS2', 'SQLITE_ENABLE_FTS3', 'SQLITE_ENABLE_ICU', 'SQLITE_ENABLE_MEMORY_MANAGEMENT', 'SQLITE_SECURE_DELETE', 'SQLITE_SEPERATE_CACHE_POOLS', 'THREADSAFE', '_HAS_EXCEPTIONS=0', ], }, 'targets': [ { 'target_name': 'sqlite', 'conditions': [ [ 'chromeos==1' , { 'defines': [ # Despite obvious warnings about not using this flag # in deployment, we are turning off sync in ChromeOS # and relying on the underlying journaling filesystem # to do error recovery properly. It's much faster. 'SQLITE_NO_SYNC', ], }, ], ['use_system_sqlite', { 'type': 'none', 'direct_dependent_settings': { 'defines': [ 'USE_SYSTEM_SQLITE', ], }, 'conditions': [ ['OS == "ios"', { 'dependencies': [ 'sqlite_regexp', ], 'link_settings': { 'libraries': [ '$(SDKROOT)/usr/lib/libsqlite3.dylib', ], }, }], ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', { 'direct_dependent_settings': { 'cflags': [ # This next command produces no output but it it will fail # (and cause GYP to fail) if we don't have a recent enough # version of sqlite. '