|
74 | 74 | pl.add_compiler_flags("-Wno-deprecated-declarations", "--debug -g", "-std=c99", "-fmodules", "-ObjC", "-fPIC") |
75 | 75 | pl.add_link_frameworks("Cocoa", "IOKit", "CoreFoundation") |
76 | 76 |
|
77 | | - with pl.configuration("release"): |
78 | | - |
79 | | - pl.set_output_binary("glfw") |
80 | | - |
81 | | - # win32 |
82 | | - with pl.platform("Windows"): |
83 | | - with pl.compiler("msvc"): |
84 | | - pl.add_include_directories("%VULKAN_SDK%\\Include") |
85 | | - pl.add_definitions("UNICODE", "_UNICODE", "_CRT_SECURE_NO_WARNINGS", "_GLFW_VULKAN_STATIC", "_GLFW_WIN32") |
86 | | - pl.add_compiler_flags("-nologo", "-std:c11", "-W3", "-wd5105", "-O2", "-MD", "-Zi", "-permissive") |
87 | | - pl.add_linker_flags("-incremental:no", "-nologo") |
88 | | - |
89 | | - # linux |
90 | | - with pl.platform("Linux"): |
91 | | - with pl.compiler("gcc"): |
92 | | - pl.add_definitions("_GLFW_VULKAN_STATIC", "_GLFW_X11") |
93 | | - pl.add_include_directories('$VULKAN_SDK/include', '/usr/include/vulkan', '/usr/include/vulkan') |
94 | | - pl.add_dynamic_link_libraries("xcb", "X11", "X11-xcb", "xkbcommon", "pthread", "xcb-cursor", "vulkan") |
95 | | - pl.add_link_directories('$VULKAN_SDK/lib') |
96 | | - pl.add_compiler_flags("-fPIC", "-std=gnu99") |
97 | | - pl.add_linker_flags("-ldl -lm") |
98 | | - pl.add_source_files("../dependencies/glfw/src/posix_poll.c") |
99 | | - |
100 | | - # apple |
101 | | - with pl.platform("Darwin"): |
102 | | - with pl.compiler("clang"): |
103 | | - pl.add_definitions("_GLFW_VULKAN_STATIC", "_GLFW_COCOA") |
104 | | - pl.add_include_directories('$VULKAN_SDK/include', '/usr/include/vulkan', '/usr/include/vulkan') |
105 | | - pl.add_dynamic_link_libraries("spirv-cross-c-shared", "shaderc_shared", "vulkan") |
106 | | - pl.add_link_directories('$VULKAN_SDK/lib', "/usr/local/lib") |
107 | | - pl.add_compiler_flags("-std=c99", "-fmodules", "-ObjC", "-fPIC", "-Wno-deprecated-declarations") |
108 | | - |
109 | | - pl.add_link_frameworks("Cocoa", "IOKit", "CoreFoundation") |
110 | | - |
111 | 77 | with pl.configuration("deploy"): |
112 | 78 |
|
113 | 79 | pl.set_output_binary("glfw") |
|
148 | 114 |
|
149 | 115 | with pl.target("pl_platform_ext", pl.TargetType.STATIC_LIBRARY, False, False): |
150 | 116 |
|
151 | | - |
152 | 117 | pl.add_include_directories( |
153 | 118 | "../../pilotlight/libs", |
154 | 119 | "../../pilotlight/extensions", |
155 | | - "../../pilotlight/src", |
156 | | - "../../pilotlight/shaders", |
157 | 120 | "../../pilotlight/dependencies/stb", |
158 | | - "../../pilotlight/dependencies/cgltf", |
159 | | - "../../pilotlight/dependencies/glfw/include/", |
160 | | - "../dependencies/cpython/", |
161 | | - "../dependencies/cpython/Include/", |
162 | | - "../dependencies/cpython/PC/" |
| 121 | + "../../pilotlight/src" |
163 | 122 | ) |
164 | 123 |
|
165 | 124 | pl.set_output_binary("pl_platform_ext") |
166 | 125 |
|
167 | 126 | with pl.configuration("debug"): |
168 | 127 |
|
169 | | - # win32 |
170 | | - with pl.platform("Windows"): |
171 | | - with pl.compiler("msvc"): |
172 | | - pl.add_definitions("Py_PYTHON_H") |
173 | | - pl.add_source_files("../../pilotlight/extensions/pl_platform_win32_ext.c") |
174 | | - pl.add_static_link_libraries("ucrtd", "user32", "Ole32") |
175 | | - pl.add_compiler_flags("-std:c11", "-nologo") |
| 128 | + pl.add_include_directories( |
| 129 | + "../dependencies/cpython/", |
| 130 | + "../dependencies/cpython/Include/" |
| 131 | + ) |
176 | 132 |
|
177 | | - with pl.configuration("release"): |
178 | | - |
179 | 133 | # win32 |
180 | 134 | with pl.platform("Windows"): |
| 135 | + |
| 136 | + pl.add_include_directories("../dependencies/cpython/PC/") |
| 137 | + |
181 | 138 | with pl.compiler("msvc"): |
182 | 139 | pl.add_definitions("Py_PYTHON_H") |
183 | 140 | pl.add_source_files("../../pilotlight/extensions/pl_platform_win32_ext.c") |
184 | | - pl.add_static_link_libraries("ucrt", "user32", "Ole32") |
| 141 | + pl.add_static_link_libraries("ucrtd", "user32", "Ole32") |
185 | 142 | pl.add_compiler_flags("-std:c11", "-nologo") |
186 | 143 |
|
187 | 144 | with pl.configuration("deploy"): |
|
197 | 154 | with pl.target("pilotlight_python", pl.TargetType.EXECUTABLE, False): |
198 | 155 |
|
199 | 156 | pl.add_include_directories( |
200 | | - "../../pilotlight/libs", |
201 | | - "../../pilotlight/extensions", |
202 | | - "../../pilotlight/src", |
203 | | - "../../pilotlight/shaders", |
204 | | - "../../pilotlight/dependencies/stb", |
205 | | - "../../pilotlight/dependencies/cgltf", |
206 | | - "../../pilotlight/dependencies/glfw/include/", |
207 | 157 | "../dependencies/cpython/", |
208 | 158 | "../dependencies/cpython/Include/", |
209 | | - "../dependencies/cpython/PC/" |
210 | 159 | ) |
211 | 160 |
|
212 | 161 | pl.add_source_files("../sandbox/main.c") |
|
216 | 165 |
|
217 | 166 | # win32 |
218 | 167 | with pl.platform("Windows"): |
| 168 | + |
| 169 | + pl.add_include_directories( |
| 170 | + "../dependencies/cpython/PC/", |
| 171 | + "%VULKAN_SDK%\\Include") |
| 172 | + |
219 | 173 | with pl.compiler("msvc"): |
220 | 174 | pl.add_definitions("PL_VULKAN_BACKEND") |
221 | | - pl.add_include_directories("%VULKAN_SDK%\\Include") |
222 | 175 | pl.add_static_link_libraries("user32", "Shell32", "Ole32", "gdi32", "ucrtd", "pl_platform_ext") |
223 | 176 | pl.add_static_link_libraries("shaderc_combined", "spirv-cross-c-shared", "vulkan-1", "glfwd") |
224 | 177 | pl.add_link_directories("../dependencies/cpython/PCbuild/amd64/", '%VULKAN_SDK%\\Lib') |
225 | 178 | pl.add_linker_flags("-noimplib", "-noexp", "-incremental:no", "-nodefaultlib:MSVCRT", "-nodefaultlib:LIBCMT") |
226 | 179 | pl.add_compiler_flags("-Zc:preprocessor", "-nologo", "-std:c11", "-W4", "-WX", "-wd4201", |
227 | 180 | "-wd4100", "-wd4996", "-wd4505", "-wd4189", "-wd5105", "-wd4115", |
228 | 181 | "-permissive-", "-Od", "-MDd", "-Zi") |
229 | | - # pl.set_post_target_build_step('@copy "%VULKAN_SDK%\\bin\\spirv-cross-c-shared.dll" "..\\out\\" >nul\n') |
230 | 182 |
|
231 | 183 |
|
232 | 184 | #----------------------------------------------------------------------------- |
|
271 | 223 | "-permissive-", "-Od", "-MDd", "-Zi") |
272 | 224 | pl.set_post_target_build_step('@copy "%VULKAN_SDK%\\bin\\spirv-cross-c-shared.dll" "..\\pilotlight\\" >nul\n') |
273 | 225 |
|
274 | | - with pl.configuration("release"): |
275 | | - |
276 | | - pl.set_output_binary("pilotlight") |
277 | | - pl.set_output_directory("../pilotlight") |
278 | | - |
279 | | - # win32 |
280 | | - with pl.platform("Windows"): |
281 | | - with pl.compiler("msvc"): |
282 | | - pl.add_definitions("PL_VULKAN_BACKEND") |
283 | | - pl.add_include_directories("%VULKAN_SDK%\\Include") |
284 | | - pl.set_output_binary_extension(".pyd") |
285 | | - pl.add_static_link_libraries("shaderc_combined", "spirv-cross-c-shared", "vulkan-1", "glfw") |
286 | | - pl.add_static_link_libraries("user32", "Shell32", "Ole32", "gdi32", "ucrt", "pl_platform_ext") |
287 | | - pl.add_link_directories("../dependencies/cpython/PCbuild/amd64/") |
288 | | - pl.add_link_directories("../dependencies/cpython/PCbuild/amd64/", '%VULKAN_SDK%\\Lib') |
289 | | - pl.add_linker_flags("-noimplib", "-noexp", "-incremental:no", "-nodefaultlib:LIBCMT") |
290 | | - pl.add_compiler_flags("-Zc:preprocessor", "-nologo", "-std:c11", "-W4", "-WX", "-wd4201", |
291 | | - "-wd4100", "-wd4996", "-wd4505", "-wd4189", "-wd5105", "-wd4115", |
292 | | - "-permissive-", "-Od", "-MD", "-Zi") |
293 | | - pl.set_post_target_build_step('@copy "%VULKAN_SDK%\\bin\\spirv-cross-c-shared.dll" "..\\pilotlight\\" >nul\n') |
294 | | - |
295 | 226 | with pl.configuration("deploy"): |
296 | 227 |
|
297 | 228 | pl.set_output_binary("pilotlight") |
|
0 commit comments