-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
23 changed files
with
957 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,5 +35,8 @@ tests/*/*.log | |
tests/*/*.sh | ||
cmake-build-debug/ | ||
.idea | ||
raylib.dir | ||
Win32 | ||
x64 | ||
|
||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,54 @@ | ||
// $Id$ | ||
// vim:ft=javascript | ||
|
||
ARG_WITH("raylib", "for raylib support", "no"); | ||
ARG_WITH("raylib", "for raylib support", "yes,shared"); | ||
|
||
if (PHP_RAYLIB != "no") { | ||
raylib_lib_paths = PHP_PHP_BUILD + "\\lib;"; | ||
raylib_include_paths = PHP_PHP_BUILD + "\\include;"; | ||
|
||
raylib_check_lib = CHECK_LIB("raylib_static.lib", "raylib", PHP_PHP_BUILD + "\\lib"); | ||
raylib_check_header = CHECK_HEADER_ADD_INCLUDE("raylib.h", "CFLAGS_RAYLIB", PHP_PHP_BUILD + "\\include"); | ||
glfw_check_lib = CHECK_LIB("glfw3.lib", "raylib", PHP_PHP_BUILD + "\\lib"); | ||
glfw_check_header = CHECK_HEADER_ADD_INCLUDE("glfw3.h", "CFLAGS_RAYLIB", PHP_PHP_BUILD + "\\include\\GLFW"); | ||
glfw_check_header2 = CHECK_HEADER_ADD_INCLUDE("glfw3native.h", "CFLAGS_RAYLIB", PHP_PHP_BUILD + "\\include\\GLFW"); | ||
glfw_check_header3 = CHECK_HEADER_ADD_INCLUDE("glfw_config.h", "CFLAGS_RAYLIB", PHP_PHP_BUILD + "\\include\\GLFW"); | ||
if ( | ||
//-- Raylib | ||
CHECK_LIB("raylib.lib", "raylib", PHP_PHP_BUILD + "\\lib") && | ||
CHECK_HEADER_ADD_INCLUDE("raylib.h", "CFLAGS_RAYLIB", PHP_PHP_BUILD + "\\include") && | ||
raylib_check_lib && | ||
raylib_check_header && | ||
//-- GLFW | ||
CHECK_LIB("glfw3dll.lib", "raylib", PHP_PHP_BUILD + "\\lib") && | ||
CHECK_HEADER_ADD_INCLUDE("glfw3.h", "CFLAGS_RAYLIB", PHP_PHP_BUILD + "\\include\\GLFW") | ||
glfw_check_lib && | ||
glfw_check_header && | ||
glfw_check_header2 && | ||
glfw_check_header3 | ||
) { | ||
|
||
ADD_FLAG("LIBS_CLI", "raylib.lib glfw3dll.lib"); | ||
ADD_FLAG("LIBS_CLI", "raylib_static.lib glfw3.lib"); | ||
|
||
var raylib_sources = "raylib.c raylib-camera3d.c raylib-camera3d.h raylib-camera3d.lo raylib-camera2d.c raylib-camera2d.h raylib-camera2d.lo raylib-cursor.c raylib-cursor.h raylib-cursor.lo raylib-draw.c raylib-image.c raylib-key.c raylib-rendertexture.c raylib-font.c raylib-text.c raylib-texture.c raylib-timming.c raylib-utils.c raylib-window.c raylib-mouse.c raylib-collision.c raylib-color.c raylib-vector4.c raylib-vector3.c raylib-vector2.c raylib-rectangle.c"; | ||
PHP_INSTALL_HEADERS("ext/raylib", "php_raylib.h raylib-image.h raylib-window.h raylib-text.h raylib-cursor.h raylib-color.h raylib-texture.h raylib-utils.h"); | ||
EXTENSION("raylib", raylib_sources, true, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1", "php" + PHP_VERSION + "raylib.dll"); | ||
ADD_FLAG("LIBS_RAYLIB", "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") | ||
|
||
|
||
var raylib_sources = "raylib.c raylib-camera3d.c raylib-camera2d.c raylib-cursor.c raylib-draw.c raylib-image.c raylib-key.c raylib-rendertexture.c raylib-font.c raylib-text.c raylib-texture.c raylib-timming.c raylib-utils.c raylib-window.c raylib-mouse.c raylib-collision.c raylib-color.c raylib-vector4.c raylib-vector3.c raylib-vector2.c raylib-rectangle.c"; | ||
PHP_INSTALL_HEADERS("ext/raylib", "php_raylib.h raylib-camera3d.h raylib-camera2d.h raylib-cursor.h raylib-draw.h raylib-image.h raylib-key.h raylib-rendertexture.h raylib-font.h raylib-text.h raylib-texture.h raylib-timming.h raylib-utils.h raylib-window.h raylib-mouse.h raylib-collision.h raylib-color.h raylib-vector4.h raylib-vector3.h raylib-rectangle.h"); | ||
EXTENSION("raylib", raylib_sources, true, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1", "php_raylib.dll"); | ||
|
||
} else { | ||
WARNING("raylib not enabled; libraries not found"); | ||
if (!raylib_check_lib) { | ||
WARNING("raylib lib missing" + PHP_PHP_BUILD); | ||
} | ||
if (!raylib_check_header) { | ||
WARNING("raylib header missing"); | ||
} | ||
if (!glfw_check_lib) { | ||
WARNING("glfw lib missing"); | ||
} | ||
if (!glfw_check_header) { | ||
WARNING("glfw header missing"); | ||
} | ||
} | ||
} else { | ||
WARNING("raylib not enabled; not set with"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.