Skip to content

Commit

Permalink
Windows config
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-deluna committed Nov 11, 2023
1 parent d8b963e commit d80d036
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ if (PHP_GLFW != "no") {
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("fast_obj.h", "CFLAGS_GLFW", configure_module_dirname + "\\vendor\\fastobj;" + 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 + "\\src;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("nanovg_gl_utils.h", "CFLAGS_GLFW", configure_module_dirname + "\\src;" + PHP_EXTRA_INCLUDES) &&
CHECK_HEADER_ADD_INCLUDE("stb_truetype.h", "CFLAGS_GLFW", configure_module_dirname + "\\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";
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";
Expand All @@ -25,6 +30,7 @@ if (PHP_GLFW != "no") {
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');
Expand Down

0 comments on commit d80d036

Please sign in to comment.