-
Notifications
You must be signed in to change notification settings - Fork 31
/
binding.gyp
112 lines (108 loc) · 3.27 KB
/
binding.gyp
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
{
'includes': [
'filenames_libyue.gypi',
'filenames_src.gypi',
],
'targets': [
{
'target_name': 'gui',
'win_delay_load_hook': 'false',
'includes': [ 'deps/filename_rules.gypi' ],
'include_dirs': [
'.',
'src',
'src/third_party/kizunapi',
'deps/libyue/include',
'deps/libyue/src/<(OS)',
],
'sources': [
'<@(libyue_sources)',
'<@(napi_yue_sources)',
],
'conditions': [
['OS=="mac"', {
'defines': [
'SYSTEM_NATIVE_UTF8',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
'$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
'$(SDKROOT)/System/Library/Frameworks/WebKit.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenDirectory.framework',
],
},
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', # required by yoga
'CLANG_CXX_LANGUAGE_STANDARD': 'c++20',
'MACOSX_DEPLOYMENT_TARGET': '10.13',
'DEAD_CODE_STRIPPING': 'YES',
'WARNING_CFLAGS': [
'-Wno-deprecated-declarations',
'-Wno-missing-field-initializers',
],
},
}],
['OS=="linux"', {
'variables': {
'pkg_libs': 'fontconfig pangoft2 gtk+-3.0 x11 webkit2gtk-4.0',
},
'cflags_cc': [
'-std=c++20',
'-fexceptions', # required by yoga
'-fdata-sections',
'-ffunction-sections',
'-Wno-deprecated-declarations',
'<!@(pkg-config --cflags <(pkg_libs))',
],
'link_settings': {
'ldflags': [
'-Wl,--as-needed,--gc-section',
'<!@(pkg-config --libs-only-L --libs-only-other <(pkg_libs))',
],
'libraries': [
'-lpthread',
'-ldl',
'-latomic',
'<!@(pkg-config --libs-only-l <(pkg_libs))',
],
},
}],
['OS=="win"', {
'defines': [
'_WINDOWS', 'WIN32', 'WIN32_LEAN_AND_MEAN', 'NOMINMAX',
'_UNICODE', 'UNICODE',
],
'link_settings': {
'libraries': [
'setupapi.lib', 'powrprof.lib', 'ws2_32.lib', 'dbghelp.lib',
'shlwapi.lib', 'version.lib', 'winmm.lib', 'wbemuuid.lib',
'psapi.lib', 'dwmapi.lib', 'propsys.lib', 'comctl32.lib',
'gdi32.lib', 'gdiplus.lib', 'urlmon.lib', 'userenv.lib',
'uxtheme.lib', 'delayimp.lib', 'runtimeobject.lib',
],
},
'msvs_disabled_warnings': [
4244,
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/std:c++20',
]
},
'VCLinkerTool': {
'DelayLoadDLLs': [
'comctl32.dll',
'setupapi.dll',
'powrprof.dll',
'dwmapi.dll',
],
},
},
}],
]
}
]
}