Browse Source

cmake: emscripten has libunwind.h, libunwind.a has missing symbols

Anonymous Maarten 2 years ago
parent
commit
55384db8a6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      CMakeLists.txt

+ 7 - 1
CMakeLists.txt

@@ -1009,7 +1009,6 @@ if(SDL_LIBC)
         float.h
         iconv.h
         inttypes.h
-        libunwind
         limits.h
         malloc.h
         math.h
@@ -1025,6 +1024,9 @@ if(SDL_LIBC)
         sys/types.h
         wchar.h
     )
+    if(NOT EMSCRIPTEN)
+      list(APPEND headers_to_check libunwind.h)
+    endif()
     foreach(_HEADER ${headers_to_check})
       string(TOUPPER "HAVE_${_HEADER}" _UPPER)
       string(REGEX REPLACE "[./]" "_" _HAVE_H ${_UPPER})
@@ -1399,6 +1401,10 @@ elseif(EMSCRIPTEN)
 
   CheckPTHREAD()
 
+  if(HAVE_LIBUNWIND_H)
+    list(APPEND EXTRA_TEST_LIBS unwind)
+  endif()
+
 elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
   if(SDL_AUDIO)
     if(SYSV5 OR SOLARIS OR HPUX)