forked from osmocom/wireshark
FindM.cmake: directly pass -lm to fix selective static linking
When CMAKE_FIND_LIBRARY_SUFFIXES is set to ".a" (in order to find only static libraries), executables would be linked with libm.a. This fails when the C runtime is not statically linked as well: https://bugzilla.redhat.com/show_bug.cgi?id=1433347 Change-Id: I1480607bd3d0678661694657a2709ee1c56f9530 Reviewed-on: https://code.wireshark.org/review/30253 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
54286eb09c
commit
55cd530cf0
|
@ -34,8 +34,7 @@ SET(CMAKE_FIND_FRAMEWORK LAST)
|
|||
FIND_PATH(M_INCLUDE_DIR math.h)
|
||||
SET(CMAKE_FIND_FRAMEWORK ${SAVED_CMAKE_FIND_FRAMEWORK})
|
||||
|
||||
SET(M_NAMES m)
|
||||
FIND_LIBRARY(M_LIBRARY NAMES ${M_NAMES} )
|
||||
set(M_LIBRARY m)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set M_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
|
|
Loading…
Reference in New Issue