-
Notifications
You must be signed in to change notification settings - Fork 14
/
config.w32
39 lines (31 loc) · 2.59 KB
/
config.w32
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
// vim: ft=javascript:
ARG_ENABLE("glfw", "whether to enable glfw support", "no");
if (PHP_GLFW != "no") {
if (
CHECK_HEADER_ADD_INCLUDE("glad/glad.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\glad\\include;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("GLFW/glfw3.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\glfw\\include;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("cvector.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\cvector;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("stb_image.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\stb;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("stb_perlin.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\stb;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("fast_obj.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\fastobj;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("nanovg.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\nanovg\\src;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("nanovg_gl.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\nanovg\\src;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("nanovg_gl_utils.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\nanovg\\src;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("stb_truetype.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\nanovg\\src;" + PHP_EXTRA_INCLUDES)
) {
var sources = "phpglfw.c phpglfw_constants.c phpglfw_functions.c phpglfw_math.c phpglfw_buffer.c phpglfw_texture.c phpglfw_objparser.c phpglfw_vg.c";
var glad_sources = "glad.c";
var fastobj_sources = "fast_obj.c";
var nanovg_sources = "nanovg.c";
var glfw_sources = "context.c init.c input.c monitor.c vulkan.c window.c win32_init.c win32_joystick.c " +
"win32_monitor.c win32_time.c win32_thread.c win32_window.c " +
"wgl_context.c egl_context.c osmesa_context.c";
EXTENSION("glfw", sources);
ADD_SOURCES(configure_module_dirname + "\\vendor\\glad\\src", glad_sources, "glfw");
ADD_SOURCES(configure_module_dirname + "\\vendor\\glfw\\src", glfw_sources, "glfw");
ADD_SOURCES(configure_module_dirname + "\\vendor\\fastobj", fastobj_sources, "glfw");
ADD_SOURCES(configure_module_dirname + "\\vendor\\nanovg\\src", nanovg_sources, "glfw");
ADD_FLAG("LIBS_GLFW", "kernel32.lib user32.lib gdi32.lib winmm.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib")
ADD_FLAG("CFLAGS_GLFW", ' -D_GLFW_WIN32=1 -DNVG_NO_STB=1');
}
}