mirror of
https://github.com/taglib/taglib.git
synced 2025-05-25 12:10:26 -04:00
Fix WASM build by inverting wchar_t size check
When building WASM with emscripten cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake ... all SIZEOF_ variables which should be defined in ConfigureChecks.cmake are empty and the wchar_t check fails with "LESS" "2", the other checks seem to pass since they start with NOT. Instead of explicitly skipping the check for "if(NOT EMSCRIPTEN)" as is done in vcpkg's disable-wchar-t-check-emscripten.patch, the check is inverted to start with NOT, so the build still has a chance to run for compilers which behave like emscripten.
This commit is contained in:
parent
7951f572b5
commit
99bc87ccff
@ -20,7 +20,7 @@ if(NOT ${SIZEOF_LONGLONG} EQUAL 8)
|
||||
endif()
|
||||
|
||||
check_type_size("wchar_t" SIZEOF_WCHAR_T)
|
||||
if(${SIZEOF_WCHAR_T} LESS 2)
|
||||
if(NOT ${SIZEOF_WCHAR_T} GREATER 1)
|
||||
message(FATAL_ERROR "TagLib requires that wchar_t is sufficient to store a UTF-16 char.")
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user