fix glfw linking issue

This commit is contained in:
crazywhalecc 2023-11-01 01:35:15 +08:00 committed by Jerry Ma
parent 58897c6941
commit 772ab77d2e

View File

@ -17,10 +17,19 @@ class glfw extends Extension
*/
public function patchBeforeBuildconf(): bool
{
if (file_exists(SOURCE_PATH . '/php-src/ext/glfw')) {
return false;
}
FileSystem::copyDir(SOURCE_PATH . '/ext-glfw', SOURCE_PATH . '/php-src/ext/glfw');
return true;
}
public function patchBeforeConfigure(): bool
{
FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/configure', '-lglfw ', '-lglfw3 ');
return true;
}
public function getUnixConfigureArg(): string
{
return '--enable-glfw --with-glfw-dir=' . BUILD_ROOT_PATH;