1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
dofile "premake/wxwidgets.lua"
BUILDDIR = _OPTIONS["builddir"] or "build"
workspace "wxsqlite3"
configurations { "Debug", "Release", "DLL Debug", "DLL Release" }
platforms { "Win32", "Win64" }
location(BUILDDIR)
if (is_msvc) then
local wks = workspace()
wks.filename = "wxsqlite3_" .. vc_with_ver
end
defines {
"_WINDOWS",
"_CRT_SECURE_NO_WARNINGS",
"_CRT_SECURE_NO_DEPRECATE",
"_CRT_NONSTDC_NO_DEPRECATE"
}
init_filters()
-- SQLite3 static library
project "libsqlite3"
language "C++"
kind "StaticLib"
if (is_msvc) then
local prj = project()
prj.filename = "wxsqlite3_" .. vc_with_ver .. "_libsqlite3"
end
files { "sqlite3/secure/src/sqlite3secure.c", "sqlite3/secure/src/*.h" }
vpaths {
["Header Files"] = { "**.h" },
["Source Files"] = { "**/sqlite3secure.c", "**.def", "**.rc" }
}
flags { "Unicode" }
location( BUILDDIR )
-- targetname "libsqlite3"
defines {
"_LIB",
"THREADSAFE=1",
"SQLITE_SOUNDEX",
"SQLITE_ENABLE_COLUMN_METADATA",
"SQLITE_HAS_CODEC",
"CODEC_TYPE=CODEC_TYPE_AES128",
"SQLITE_SECURE_DELETE",
"SQLITE_ENABLE_FTS3",
"SQLITE_ENABLE_FTS3_PARENTHESIS",
"SQLITE_ENABLE_FTS4",
"SQLITE_ENABLE_FTS5",
"SQLITE_ENABLE_JSON1",
"SQLITE_ENABLE_RTREE",
"SQLITE_CORE",
"SQLITE_ENABLE_EXTFUNC",
"SQLITE_ENABLE_CSV",
"SQLITE_USE_URI",
"SQLITE_USER_AUTHENTICATION"
}
-- wxSQLite3
project "wxsqlite3"
location(BUILDDIR)
language "C++"
if (is_msvc) then
local prj = project()
prj.filename = "wxsqlite3_" .. vc_with_ver .. "_wxsqlite3"
end
make_filters( "WXSQLITE3" )
defines {
"wxUSE_DYNAMIC_SQLITE3_LOAD=0",
"WXSQLITE3_HAVE_METADATA=1",
"WXSQLITE3_HAVE_CODEC=1",
"WXSQLITE3_HAVE_LOAD_EXTENSION=0"
}
files { "src/*.cpp", "include/wx/*.h" }
vpaths {
["Header Files"] = { "**.h" },
["Source Files"] = { "**.cpp" }
}
includedirs { "include", "sqlite3/include" }
flags { "Unicode" }
links { "libsqlite3" }
-- Minimal wxSQLite3 sample
project "minimal"
location(BUILDDIR)
language "C++"
kind "ConsoleApp"
if (is_msvc) then
local prj = project()
prj.filename = "wxsqlite3_" .. vc_with_ver .. "_minimal"
end
files { "samples/*.cpp", "samples/*.rc" }
vpaths {
["Header Files"] = { "**.h" },
["Source Files"] = { "**.cpp", "**.rc" }
}
includedirs { "samples", "include" }
flags { "Unicode", "WinMain" }
links { "wxsqlite3" }
links { "libsqlite3" }
targetdir "samples"
use_filters( "WXSQLITE3" )
-- Minimal wxSQLite3 sample
project "treeview"
location(BUILDDIR)
language "C++"
kind "WindowedApp"
if (is_msvc) then
local prj = project()
prj.filename = "wxsqlite3_" .. vc_with_ver .. "_treeview"
end
files { "samples/treeview/*.cpp", "samples/treeview/*.rc" }
vpaths {
["Header Files"] = { "**.h" },
["Source Files"] = { "**.cpp", "**.rc" }
}
includedirs { "samples/treeview", "include" }
flags { "Unicode", "WinMain" }
links { "wxsqlite3" }
links { "libsqlite3" }
targetdir "samples"
use_filters( "WXSQLITE3" )
|