aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/winpty/src/winpty.gyp
blob: 7ee68d55e6079eecd3e382c604fb0de90b9ef4aa (plain)
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
{
    # The MSVC generator is the default.  Select the compiler version by
    # passing -G msvs_version=<ver> to gyp.  <ver> is a string like 2013e.
    # See gyp\pylib\gyp\MSVSVersion.py for sample version strings.  You
    # can also pass configurations.gypi to gyp for 32-bit and 64-bit builds.
    # See that file for details.
    #
    # Pass --format=make to gyp to generate a Makefile instead.  The Makefile
    # can be configured by passing variables to make, e.g.:
    #    make -j4 CXX=i686-w64-mingw32-g++ LDFLAGS="-static -static-libgcc -static-libstdc++"

    'variables': {
        'WINPTY_COMMIT_HASH%': '<!(cmd /c "cd shared && GetCommitHash.bat")',
    },
    'target_defaults' : {
        'defines' : [
            'UNICODE',
            '_UNICODE',
            '_WIN32_WINNT=0x0501',
            'NOMINMAX',
        ],
        'include_dirs': [
            # Add the 'src/gen' directory to the include path and force gyp to
            # run the script (re)generating the version header.
            '<!(cmd /c "cd shared && UpdateGenVersion.bat <(WINPTY_COMMIT_HASH)")',
        ],
    },
    'targets' : [
        {
            'target_name' : 'winpty-agent',
            'type' : 'executable',
            'include_dirs' : [
                'include',
            ],
            'defines' : [
                'WINPTY_AGENT_ASSERT',
            ],
            'libraries' : [
                '-ladvapi32',
                '-lshell32',
                '-luser32',
            ],
            'msvs_settings': {
                # Specify this setting here to override a setting from somewhere
                # else, such as node's common.gypi.
                'VCCLCompilerTool': {
                    'ExceptionHandling': '1', # /EHsc
                },
            },
            'sources' : [
                'agent/Agent.h',
                'agent/Agent.cc',
                'agent/AgentCreateDesktop.h',
                'agent/AgentCreateDesktop.cc',
                'agent/ConsoleFont.cc',
                'agent/ConsoleFont.h',
                'agent/ConsoleInput.cc',
                'agent/ConsoleInput.h',
                'agent/ConsoleInputReencoding.cc',
                'agent/ConsoleInputReencoding.h',
                'agent/ConsoleLine.cc',
                'agent/ConsoleLine.h',
                'agent/Coord.h',
                'agent/DebugShowInput.h',
                'agent/DebugShowInput.cc',
                'agent/DefaultInputMap.h',
                'agent/DefaultInputMap.cc',
                'agent/DsrSender.h',
                'agent/EventLoop.h',
                'agent/EventLoop.cc',
                'agent/InputMap.h',
                'agent/InputMap.cc',
                'agent/LargeConsoleRead.h',
                'agent/LargeConsoleRead.cc',
                'agent/NamedPipe.h',
                'agent/NamedPipe.cc',
                'agent/Scraper.h',
                'agent/Scraper.cc',
                'agent/SimplePool.h',
                'agent/SmallRect.h',
                'agent/Terminal.h',
                'agent/Terminal.cc',
                'agent/UnicodeEncoding.h',
                'agent/Win32Console.cc',
                'agent/Win32Console.h',
                'agent/Win32ConsoleBuffer.cc',
                'agent/Win32ConsoleBuffer.h',
                'agent/main.cc',
                'shared/AgentMsg.h',
                'shared/BackgroundDesktop.h',
                'shared/BackgroundDesktop.cc',
                'shared/Buffer.h',
                'shared/Buffer.cc',
                'shared/DebugClient.h',
                'shared/DebugClient.cc',
                'shared/GenRandom.h',
                'shared/GenRandom.cc',
                'shared/OsModule.h',
                'shared/OwnedHandle.h',
                'shared/OwnedHandle.cc',
                'shared/StringBuilder.h',
                'shared/StringUtil.cc',
                'shared/StringUtil.h',
                'shared/UnixCtrlChars.h',
                'shared/WindowsSecurity.cc',
                'shared/WindowsSecurity.h',
                'shared/WindowsVersion.h',
                'shared/WindowsVersion.cc',
                'shared/WinptyAssert.h',
                'shared/WinptyAssert.cc',
                'shared/WinptyException.h',
                'shared/WinptyException.cc',
                'shared/WinptyVersion.h',
                'shared/WinptyVersion.cc',
                'shared/winpty_snprintf.h',
            ],
        },
        {
            'target_name' : 'winpty',
            'type' : 'shared_library',
            'include_dirs' : [
                'include',
            ],
            'defines' : [
                'COMPILING_WINPTY_DLL',
            ],
            'libraries' : [
                '-ladvapi32',
                '-luser32',
            ],
            'msvs_settings': {
                # Specify this setting here to override a setting from somewhere
                # else, such as node's common.gypi.
                'VCCLCompilerTool': {
                    'ExceptionHandling': '1', # /EHsc
                },
            },
            'sources' : [
                'include/winpty.h',
                'libwinpty/AgentLocation.cc',
                'libwinpty/AgentLocation.h',
                'libwinpty/winpty.cc',
                'shared/AgentMsg.h',
                'shared/BackgroundDesktop.h',
                'shared/BackgroundDesktop.cc',
                'shared/Buffer.h',
                'shared/Buffer.cc',
                'shared/DebugClient.h',
                'shared/DebugClient.cc',
                'shared/GenRandom.h',
                'shared/GenRandom.cc',
                'shared/OsModule.h',
                'shared/OwnedHandle.h',
                'shared/OwnedHandle.cc',
                'shared/StringBuilder.h',
                'shared/StringUtil.cc',
                'shared/StringUtil.h',
                'shared/WindowsSecurity.cc',
                'shared/WindowsSecurity.h',
                'shared/WindowsVersion.h',
                'shared/WindowsVersion.cc',
                'shared/WinptyAssert.h',
                'shared/WinptyAssert.cc',
                'shared/WinptyException.h',
                'shared/WinptyException.cc',
                'shared/WinptyVersion.h',
                'shared/WinptyVersion.cc',
                'shared/winpty_snprintf.h',
            ],
        },
        {
            'target_name' : 'winpty-debugserver',
            'type' : 'executable',
            'msvs_settings': {
                # Specify this setting here to override a setting from somewhere
                # else, such as node's common.gypi.
                'VCCLCompilerTool': {
                    'ExceptionHandling': '1', # /EHsc
                },
            },
            'sources' : [
                'debugserver/DebugServer.cc',
                'shared/DebugClient.h',
                'shared/DebugClient.cc',
                'shared/OwnedHandle.h',
                'shared/OwnedHandle.cc',
                'shared/OsModule.h',
                'shared/StringBuilder.h',
                'shared/StringUtil.cc',
                'shared/StringUtil.h',
                'shared/WindowsSecurity.h',
                'shared/WindowsSecurity.cc',
                'shared/WindowsVersion.h',
                'shared/WindowsVersion.cc',
                'shared/WinptyAssert.h',
                'shared/WinptyAssert.cc',
                'shared/WinptyException.h',
                'shared/WinptyException.cc',
                'shared/winpty_snprintf.h',
            ],
            'libraries' : [
                '-ladvapi32',
            ],
        }
    ],
}