diff --git a/cmake/LibraryNaming.cmake b/cmake/LibraryNaming.cmake index 514313ff..22a70eb3 100644 --- a/cmake/LibraryNaming.cmake +++ b/cmake/LibraryNaming.cmake @@ -28,6 +28,7 @@ check_symbol_exists(XASH_LINUX "build.h" XASH_LINUX) check_symbol_exists(XASH_LITTLE_ENDIAN "build.h" XASH_LITTLE_ENDIAN) check_symbol_exists(XASH_MINGW "build.h" XASH_MINGW) check_symbol_exists(XASH_MIPS "build.h" XASH_MIPS) +check_symbol_exists(XASH_PPC "build.h" XASH_PPC) check_symbol_exists(XASH_MOBILE_PLATFORM "build.h" XASH_MOBILE_PLATFORM) check_symbol_exists(XASH_MSVC "build.h" XASH_MSVC) check_symbol_exists(XASH_NETBSD "build.h" XASH_NETBSD) @@ -97,6 +98,15 @@ elseif(XASH_MIPS) if(XASH_LITTLE_ENDIAN) set(BUILDARCH "${BUILDARCH}el") endif() +elseif(XASH_PPC) + set(BUILDARCH "powerpc") + if(XASH_64BIT) + set(BUILDARCH "${BUILDARCH}64") + endif() + + if(XASH_LITTLE_ENDIAN) + set(BUILDARCH "${BUILDARCH}le") + endif() elseif(XASH_RISCV) set(BUILDARCH "riscv") if(XASH_64BIT) diff --git a/public/build.h b/public/build.h index 6e1f326d..3692cf17 100644 --- a/public/build.h +++ b/public/build.h @@ -65,6 +65,7 @@ For more information, please refer to #undef XASH_LITTLE_ENDIAN #undef XASH_MINGW #undef XASH_MIPS +#undef XASH_PPC #undef XASH_MOBILE_PLATFORM #undef XASH_MSVC #undef XASH_NETBSD @@ -212,6 +213,11 @@ For more information, please refer to #endif // __SOFTFP__ #elif defined __mips__ #define XASH_MIPS 1 +#elif defined __powerpc__ + #define XASH_PPC 1 + #if defined __powerpc64__ + #define XASH_64BIT 1 + #endif #elif defined __EMSCRIPTEN__ #define XASH_JS 1 #elif defined __e2k__