mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Fix linking with libm
Fixes using clang's MSVC ABI. Fixes: https://github.com/quickjs-ng/quickjs/issues/728
This commit is contained in:
parent
a41771f735
commit
ebc1a655b4
1 changed files with 4 additions and 1 deletions
|
@ -212,7 +212,10 @@ find_package(Threads)
|
|||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "WASI")
|
||||
list(APPEND qjs_libs ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
if(NOT MSVC)
|
||||
|
||||
# try to find libm
|
||||
find_library(M_LIBRARIES m)
|
||||
if(M_LIBRARIES OR CMAKE_C_COMPILER_ID STREQUAL "TinyCC")
|
||||
list(APPEND qjs_libs m)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue