mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-24 07:43:44 +02:00
16 lines
712 B
Diff
16 lines
712 B
Diff
# Disables checking for endianness when targeting Emscripten because it causes configuration errors, and because we already know Emscripten targets are always little-endian.
|
|
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -19,7 +19,10 @@ if("${LOWERCASE_BUILD_TYPE}" STREQUAL "debug")
|
|
set(DEBUG TRUE)
|
|
endif()
|
|
include(TestBigEndian)
|
|
-test_big_endian(WORDS_BIGENDIAN)
|
|
+string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_LOWER)
|
|
+if(NOT SYSTEM_LOWER STREQUAL "emscripten")
|
|
+ test_big_endian(WORDS_BIGENDIAN)
|
|
+endif()
|
|
include(CheckIncludeFiles)
|
|
check_include_files("stdlib.h;stdio.h;stdarg.h;string.h;float.h;limits.h;math.h" STDC_HEADERS)
|
|
set(HAVE_STDLIB_H ${STDC_HEADERS} CACHE INTERNAL "Have include stdlib.h")
|