Merge pull request #224 from Arkshine/feature/third-party-libs-part2
Move SQLite and GeoIP2 libs to /third_party
This commit is contained in:
commit
54c978addb
|
@ -3,13 +3,17 @@ import os.path
|
||||||
|
|
||||||
binary = AMXX.MetaModule(builder, 'geoip')
|
binary = AMXX.MetaModule(builder, 'geoip')
|
||||||
|
|
||||||
|
binary.compiler.cxxincludes += [
|
||||||
|
os.path.join(builder.currentSourcePath, '..', '..', 'third_party', 'libmaxminddb')
|
||||||
|
]
|
||||||
|
|
||||||
binary.compiler.defines += [
|
binary.compiler.defines += [
|
||||||
'HAVE_STDINT_H'
|
'HAVE_STDINT_H'
|
||||||
]
|
]
|
||||||
|
|
||||||
binary.sources = [
|
binary.sources = [
|
||||||
'../../public/sdk/amxxmodule.cpp',
|
'../../public/sdk/amxxmodule.cpp',
|
||||||
'GeoIP2/maxminddb.c',
|
'../../third_party/libmaxminddb/maxminddb.c',
|
||||||
'geoip_main.cpp',
|
'geoip_main.cpp',
|
||||||
'geoip_natives.cpp',
|
'geoip_natives.cpp',
|
||||||
'geoip_util.cpp',
|
'geoip_util.cpp',
|
||||||
|
@ -20,6 +24,5 @@ if builder.target_platform == 'windows':
|
||||||
|
|
||||||
if builder.target_platform == 'windows':
|
if builder.target_platform == 'windows':
|
||||||
binary.compiler.postlink += ['ws2_32.lib']
|
binary.compiler.postlink += ['ws2_32.lib']
|
||||||
binary.compiler.includes += [os.path.join(builder.sourcePath, 'dlls', 'geoip', 'GeoIP2')]
|
|
||||||
|
|
||||||
AMXX.modules += [builder.Add(binary)]
|
AMXX.modules += [builder.Add(binary)]
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
HLSDK = ../../../hlsdk
|
HLSDK = ../../../hlsdk
|
||||||
MM_ROOT = ../../../metamod/metamod
|
MM_ROOT = ../../../metamod/metamod
|
||||||
PUBLIC_ROOT = ../../public
|
PUBLIC_ROOT = ../../public
|
||||||
|
THIRD_PARTY = $(PUBLIC_ROOT)/third_party
|
||||||
|
GEOIP = $(THIRD_PARTY)/libmaxminddb
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
@ -15,7 +17,7 @@ PUBLIC_ROOT = ../../public
|
||||||
|
|
||||||
PROJECT = geoip
|
PROJECT = geoip
|
||||||
|
|
||||||
OBJECTS = amxxmodule.cpp GeoIP2/maxminddb.c geoip_main.cpp geoip_natives.cpp geoip_util.cpp
|
OBJECTS = amxxmodule.cpp $(GEOIP)/maxminddb.c geoip_main.cpp geoip_natives.cpp geoip_util.cpp
|
||||||
|
|
||||||
##############################################
|
##############################################
|
||||||
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ###
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#ifndef _INCLUDE_GEOIPMAIN_H
|
#ifndef _INCLUDE_GEOIPMAIN_H
|
||||||
#define _INCLUDE_GEOIPMAIN_H
|
#define _INCLUDE_GEOIPMAIN_H
|
||||||
|
|
||||||
#include "GeoIP2/maxminddb.h"
|
#include "maxminddb.h"
|
||||||
#include "amxxmodule.h"
|
#include "amxxmodule.h"
|
||||||
|
|
||||||
bool loadDatabase();
|
bool loadDatabase();
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\;..\sdk;..\..\..\public;..\..\..\public\amtl\include;..\..\third_party;..\..\third_party\hashing;..\..\..\public\sdk;..\GeoIP2;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\pm_shared;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\;..\sdk;..\..\..\public;..\..\..\public\amtl\include;..\..\..\third_party\libmaxminddb;..\..\third_party\hashing;..\..\..\public\sdk;..\GeoIP2;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\pm_shared;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;HAVE_STDINT_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;HAVE_STDINT_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..\;..\sdk;..\..\..\public;..\..\..\public\amtl\include;..\..\third_party;..\..\third_party\hashing;..\..\..\public\sdk;..\GeoIP2;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\pm_shared;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\;..\sdk;..\..\..\public;..\..\..\public\amtl\include;..\..\..\third_party\libmaxminddb;..\..\third_party\hashing;..\..\..\public\sdk;..\GeoIP2;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\pm_shared;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;HAVE_STDINT_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;HAVE_STDINT_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
|
@ -98,16 +98,16 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\GeoIP2\maxminddb.c" />
|
<ClCompile Include="..\..\..\third_party\libmaxminddb\maxminddb.c" />
|
||||||
<ClCompile Include="..\geoip_main.cpp" />
|
<ClCompile Include="..\geoip_main.cpp" />
|
||||||
<ClCompile Include="..\geoip_natives.cpp" />
|
<ClCompile Include="..\geoip_natives.cpp" />
|
||||||
<ClCompile Include="..\geoip_util.cpp" />
|
<ClCompile Include="..\geoip_util.cpp" />
|
||||||
<ClCompile Include="..\..\..\public\sdk\amxxmodule.cpp" />
|
<ClCompile Include="..\..\..\public\sdk\amxxmodule.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\GeoIP2\maxminddb-compat-util.h" />
|
<ClInclude Include="..\..\..\third_party\libmaxminddb\maxminddb-compat-util.h" />
|
||||||
<ClInclude Include="..\GeoIP2\maxminddb.h" />
|
<ClInclude Include="..\..\..\third_party\libmaxminddb\maxminddb.h" />
|
||||||
<ClInclude Include="..\GeoIP2\maxminddb_config.h" />
|
<ClInclude Include="..\..\..\third_party\libmaxminddb\maxminddb_config.h" />
|
||||||
<ClInclude Include="..\geoip_main.h" />
|
<ClInclude Include="..\geoip_main.h" />
|
||||||
<ClInclude Include="..\geoip_natives.h" />
|
<ClInclude Include="..\geoip_natives.h" />
|
||||||
<ClInclude Include="..\geoip_util.h" />
|
<ClInclude Include="..\geoip_util.h" />
|
||||||
|
|
|
@ -35,20 +35,11 @@
|
||||||
<ClCompile Include="..\..\..\public\sdk\amxxmodule.cpp">
|
<ClCompile Include="..\..\..\public\sdk\amxxmodule.cpp">
|
||||||
<Filter>Module SDK\SDK Base</Filter>
|
<Filter>Module SDK\SDK Base</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\GeoIP2\maxminddb.c">
|
<ClCompile Include="..\..\..\third_party\libmaxminddb\maxminddb.c">
|
||||||
<Filter>GeoIP2</Filter>
|
<Filter>GeoIP2</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\GeoIP2\maxminddb.h">
|
|
||||||
<Filter>GeoIP2</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\GeoIP2\maxminddb_config.h">
|
|
||||||
<Filter>GeoIP2</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\GeoIP2\maxminddb-compat-util.h">
|
|
||||||
<Filter>GeoIP2</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\geoip_util.h">
|
<ClInclude Include="..\geoip_util.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
@ -64,6 +55,15 @@
|
||||||
<ClInclude Include="..\..\..\public\sdk\amxxmodule.h">
|
<ClInclude Include="..\..\..\public\sdk\amxxmodule.h">
|
||||||
<Filter>Module SDK\SDK Base</Filter>
|
<Filter>Module SDK\SDK Base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\third_party\libmaxminddb\maxminddb.h">
|
||||||
|
<Filter>GeoIP2</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\third_party\libmaxminddb\maxminddb_config.h">
|
||||||
|
<Filter>GeoIP2</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\..\third_party\libmaxminddb\maxminddb-compat-util.h">
|
||||||
|
<Filter>GeoIP2</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\..\plugins\include\geoip.inc">
|
<None Include="..\..\..\plugins\include\geoip.inc">
|
||||||
|
|
|
@ -5,7 +5,7 @@ binary = AMXX.MetaModule(builder, 'sqlite')
|
||||||
binary.compiler.cxxincludes += [
|
binary.compiler.cxxincludes += [
|
||||||
os.path.join(builder.currentSourcePath, 'sqlitepp'),
|
os.path.join(builder.currentSourcePath, 'sqlitepp'),
|
||||||
os.path.join(builder.currentSourcePath, 'thread'),
|
os.path.join(builder.currentSourcePath, 'thread'),
|
||||||
os.path.join(builder.currentSourcePath, 'sqlite-source'),
|
os.path.join(builder.currentSourcePath, '..', '..', 'third_party', 'sqlite'),
|
||||||
]
|
]
|
||||||
binary.compiler.defines += [
|
binary.compiler.defines += [
|
||||||
'SM_DEFAULT_THREADER',
|
'SM_DEFAULT_THREADER',
|
||||||
|
@ -29,7 +29,7 @@ binary.sources += [
|
||||||
'sqlitepp/SqliteResultSet.cpp',
|
'sqlitepp/SqliteResultSet.cpp',
|
||||||
'sqlitepp/SqliteDatabase.cpp',
|
'sqlitepp/SqliteDatabase.cpp',
|
||||||
'sqlitepp/SqliteDriver.cpp',
|
'sqlitepp/SqliteDriver.cpp',
|
||||||
'sqlite-source/sqlite3.c',
|
'../../third_party/sqlite/sqlite3.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
if builder.target_platform == 'windows':
|
if builder.target_platform == 'windows':
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
HLSDK = ../../../hlsdk
|
HLSDK = ../../../hlsdk
|
||||||
MM_ROOT = ../../../metamod/metamod
|
MM_ROOT = ../../../metamod/metamod
|
||||||
PUBLIC_ROOT = ../../public
|
PUBLIC_ROOT = ../../public
|
||||||
SQL = sqlite-source
|
THIRD_PARTY = $(PUBLIC_ROOT)/third_party
|
||||||
|
SQL = $(THIRD_PARTY)/sqlite
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalOptions>/D "NO_TCL" %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/D "NO_TCL" %(AdditionalOptions)</AdditionalOptions>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk; ..\..\..\public\amtl\include;..\..\third_party;..\..\third_party\hashing;..\sqlite-source;..\sqlitepp;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk; ..\..\..\public\amtl\include;..\..\third_party;..\..\third_party\hashing;..\..\..\third_party\sqlite;..\sqlitepp;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;sqlite_EXPORTS;SM_DEFAULT_THREADER;HAVE_STDINT_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;sqlite_EXPORTS;SM_DEFAULT_THREADER;HAVE_STDINT_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<OmitFramePointers>true</OmitFramePointers>
|
<OmitFramePointers>true</OmitFramePointers>
|
||||||
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk; ..\..\..\public\amtl\include;..\..\third_party;..\..\third_party\hashing;..\sqlite-source;..\sqlitepp;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk; ..\..\..\public\amtl\include;..\..\third_party;..\..\third_party\hashing;..\..\..\third_party\sqlite;..\sqlitepp;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;sqlite_EXPORTS;SM_DEFAULT_THREADER;HAVE_STDINT_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;sqlite_EXPORTS;SM_DEFAULT_THREADER;HAVE_STDINT_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
<ClCompile Include="..\handles.cpp" />
|
<ClCompile Include="..\handles.cpp" />
|
||||||
<ClCompile Include="..\module.cpp" />
|
<ClCompile Include="..\module.cpp" />
|
||||||
<ClCompile Include="..\oldcompat_sql.cpp" />
|
<ClCompile Include="..\oldcompat_sql.cpp" />
|
||||||
<ClCompile Include="..\sqlite-source\sqlite3.c" />
|
<ClCompile Include="..\..\..\third_party\sqlite\sqlite3.c" />
|
||||||
<ClCompile Include="..\threading.cpp" />
|
<ClCompile Include="..\threading.cpp" />
|
||||||
<ClCompile Include="..\sqlitepp\SqliteDatabase.cpp" />
|
<ClCompile Include="..\sqlitepp\SqliteDatabase.cpp" />
|
||||||
<ClCompile Include="..\sqlitepp\SqliteDriver.cpp" />
|
<ClCompile Include="..\sqlitepp\SqliteDriver.cpp" />
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\sqlheaders.h" />
|
<ClInclude Include="..\sqlheaders.h" />
|
||||||
<ClInclude Include="..\sqlite-source\sqlite3.h" />
|
<ClInclude Include="..\..\..\third_party\sqlite\sqlite3.h" />
|
||||||
<ClInclude Include="..\sqlite_header.h" />
|
<ClInclude Include="..\sqlite_header.h" />
|
||||||
<ClInclude Include="..\threading.h" />
|
<ClInclude Include="..\threading.h" />
|
||||||
<ClInclude Include="..\sqlitepp\ISQLDriver.h" />
|
<ClInclude Include="..\sqlitepp\ISQLDriver.h" />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user