mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fix CMake build with Emscripten
When building with Emscripten, linkage to libm is neither required nor working. As find_library will fail, M_LIBRARY will be set to NOTFOUND and the build would fail later. The build works just fine without libm linkage.
This commit is contained in:
parent
a6fc80300f
commit
6842c58adc
@ -15,6 +15,7 @@
|
|||||||
# Revised by Kyle Bentley, 2018
|
# Revised by Kyle Bentley, 2018
|
||||||
# Revised by David Callu, 2020
|
# Revised by David Callu, 2020
|
||||||
# Revised by Steve Robinson, 2020
|
# Revised by Steve Robinson, 2020
|
||||||
|
# Revised by Simon Hausmann, 2020
|
||||||
|
|
||||||
# This code is released under the libpng license.
|
# This code is released under the libpng license.
|
||||||
# For conditions of distribution and use, see the disclaimer
|
# For conditions of distribution and use, see the disclaimer
|
||||||
@ -45,7 +46,7 @@ if(NOT PNG_BUILD_ZLIB)
|
|||||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
|
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN)
|
||||||
find_library(M_LIBRARY m)
|
find_library(M_LIBRARY m)
|
||||||
else()
|
else()
|
||||||
# libm is not needed and/or not available
|
# libm is not needed and/or not available
|
||||||
|
Loading…
x
Reference in New Issue
Block a user