2014-02-08 13:14:15 +04:00
|
|
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
|
|
import os.path
|
|
|
|
|
|
|
|
binary = AMXX.MetaModule(builder, 'sqlite')
|
|
|
|
binary.compiler.cxxincludes += [
|
|
|
|
os.path.join(builder.currentSourcePath, 'sqlitepp'),
|
|
|
|
os.path.join(builder.currentSourcePath, 'thread'),
|
2014-02-09 04:09:29 +04:00
|
|
|
os.path.join(builder.currentSourcePath, 'sqlite-source'),
|
2014-02-08 13:14:15 +04:00
|
|
|
]
|
|
|
|
binary.compiler.defines += [
|
|
|
|
'SM_DEFAULT_THREADER',
|
2014-08-10 19:24:38 +04:00
|
|
|
'HAVE_STDINT_H',
|
2014-02-08 13:14:15 +04:00
|
|
|
]
|
|
|
|
|
2015-01-07 01:27:51 +03:00
|
|
|
if builder.target_platform is 'linux' or builder.target_platform is 'mac':
|
2014-12-06 15:59:13 +03:00
|
|
|
binary.compiler.defines += ['stricmp=strcasecmp']
|
2014-02-08 13:14:15 +04:00
|
|
|
binary.compiler.postlink += ['-lpthread']
|
|
|
|
|
2014-02-09 04:09:29 +04:00
|
|
|
binary.sources += [
|
2014-02-08 13:14:15 +04:00
|
|
|
'basic_sql.cpp',
|
|
|
|
'handles.cpp',
|
|
|
|
'module.cpp',
|
|
|
|
'threading.cpp',
|
2014-08-10 19:24:38 +04:00
|
|
|
'../../public/sdk/amxxmodule.cpp',
|
2014-02-08 13:14:15 +04:00
|
|
|
'oldcompat_sql.cpp',
|
|
|
|
'thread/BaseWorker.cpp',
|
|
|
|
'thread/ThreadWorker.cpp',
|
|
|
|
'sqlitepp/SqliteQuery.cpp',
|
|
|
|
'sqlitepp/SqliteResultSet.cpp',
|
|
|
|
'sqlitepp/SqliteDatabase.cpp',
|
|
|
|
'sqlitepp/SqliteDriver.cpp',
|
2014-10-24 13:33:23 +04:00
|
|
|
'sqlite-source/sqlite3.c',
|
2014-02-08 13:14:15 +04:00
|
|
|
]
|
|
|
|
|
2014-02-09 04:09:29 +04:00
|
|
|
if builder.target_platform == 'windows':
|
|
|
|
binary.sources += [
|
|
|
|
'thread/WinThreads.cpp',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
binary.sources += [
|
|
|
|
'thread/PosixThreads.cpp',
|
|
|
|
]
|
|
|
|
|
2014-12-08 03:44:27 +03:00
|
|
|
if builder.target_platform == 'windows':
|
|
|
|
binary.sources += ['version.rc']
|
2014-02-09 04:09:29 +04:00
|
|
|
|
2014-02-08 13:14:15 +04:00
|
|
|
AMXX.modules += [builder.Add(binary)]
|