From 48b25cf0590aa6077dc1e01ac3847e061ccc048c Mon Sep 17 00:00:00 2001 From: meowtec Date: Fri, 3 Jan 2025 18:04:19 +0800 Subject: [PATCH] Fix emscripten build --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e860e11..61295862 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -244,11 +244,11 @@ else() # CYGWIN, MSYS, and MINGW seem to be needing this but in some cases # it might be that the toolset is not properly set, so also use this # in cases where we are not sure that it is not needed - if((NOT MSVC AND NOT LINUX AND NOT APPLE AND NOT ANDROID) OR (CYGWIN OR MSYS OR MINGW)) + if((NOT MSVC AND NOT LINUX AND NOT APPLE AND NOT ANDROID AND NOT EMSCRIPTEN) OR (CYGWIN OR MSYS OR MINGW)) set(CMAKE_C_FLAGS "-Wa,-muse-unaligned-vector-move ${CMAKE_C_FLAGS}") endif() - if(NOT ANDROID) + if(NOT ANDROID AND NOT EMSCRIPTEN) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) target_link_libraries(kvazaar PUBLIC Threads::Threads)