-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcpp.toml
More file actions
80 lines (72 loc) · 2.01 KB
/
Copy pathmcpp.toml
File metadata and controls
80 lines (72 loc) · 2.01 KB
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
[package]
name = "libmysqlclient"
version = "8.4.6"
description = "Reduced MySQL C client library built directly with mcpp"
license = "GPL-2.0-only WITH Universal-FOSS-exception-1.0"
[build]
default-profile = "release"
c_standard = "c11"
include_dirs = [
".",
"include",
"generated",
"extra/rapidjson/include",
"libs",
"libbinlogevents/include",
]
# 提取脚本只保留 mysqlclient 上游目标实际合并的翻译单元,因此这里可以用目录 glob。
# 两种定时器实现由目标平台单独追加,避免 Linux 编译 sys/event.h。
sources = [
"libmysql/*.cc",
"sql-common/*.cc",
"sql/auth/*.cc",
"mysys/*.cc",
"!mysys/kqueue_timers.cc",
"!mysys/posix_timers.cc",
"!mysys/win_timers.cc",
"!mysys/my_winfile.cc",
"!mysys/my_winerr.cc",
"!mysys/my_windac.cc",
"strings/*.cc",
"vio/*.cc",
"generated/uca900_ja_tbls.cc",
"generated/uca900_zh_tbls.cc",
]
# my_config.h 由本仓库维护,不能复用带本机安装路径的 CMake 配置快照。
cxxflags = [
"-D_GNU_SOURCE",
"-D_USE_MATH_DEFINES",
"-D__STDC_FORMAT_MACROS",
"-D__STDC_LIMIT_MACROS",
"-DLZ4_DISABLE_DEPRECATE_WARNINGS",
"-DCLIENT_PROTOCOL_TRACING",
]
[dependencies.compat]
openssl = "3.5.1"
zlib = "1.3.2"
zstd = "1.5.7"
[target.'cfg(linux)'.build]
sources = ["mysys/posix_timers.cc"]
ldflags = ["-ldl", "-lpthread", "-lresolv", "-lm"]
[target.'cfg(macos)'.build]
sources = ["mysys/kqueue_timers.cc"]
ldflags = ["-lresolv"]
# Windows support lives in this staging repo but is NOT published through the
# mcpp-index descriptor (no windows xpm entry there) until compat.openssl and
# the connector chain are Windows-ready. Kept so the source tree is complete.
[target.'cfg(windows)'.build]
sources = [
"mysys/win_timers.cc",
"mysys/my_winfile.cc",
"mysys/my_winerr.cc",
"mysys/my_windac.cc",
]
cxxflags = [
"-DWIN32_LEAN_AND_MEAN",
"-DNOMINMAX",
"-D_WIN32_WINNT=0x0A00",
"-D_CRT_SECURE_NO_WARNINGS",
]
ldflags = ["-lws2_32", "-lsecur32", "-lbcrypt", "-ladvapi32"]
[targets.mysqlclient]
kind = "lib"