mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 23:06:18 +00:00
Changed: #1152 FindLibwww does not make all needed libs link to ryzom_client
This commit is contained in:
parent
54c314474f
commit
49717a595a
1 changed files with 4 additions and 11 deletions
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
# Syntax:
|
# Syntax:
|
||||||
# CHECK_UNDEFINED_SYMBOL(MYLIBRARY SYMBOL SYMBOL_FOUND)
|
# CHECK_UNDEFINED_SYMBOL(MYLIBRARY SYMBOL SYMBOL_FOUND)
|
||||||
# SYMBOL_FOUND will be set to TRUE or FALSE
|
# SYMBOL_FOUND will be set to TRUE if UNDEFINED
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# CHECK_UNDEFINED_SYMBOL(PNG_LIBRARY inflate INFLATE_FOUND)
|
# CHECK_UNDEFINED_SYMBOL(PNG_LIBRARY inflate INFLATE_FOUND)
|
||||||
|
@ -16,21 +16,14 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
# Always TRUE under Windows because we are using static libraries
|
# Always TRUE under Windows because we are using static libraries
|
||||||
ELSEIF(APPLE)
|
ELSEIF(APPLE)
|
||||||
# SET(CMAKE_OTOOL otool)
|
|
||||||
SET(CMAKE_NM nm)
|
SET(CMAKE_NM nm)
|
||||||
IF(CMAKE_OTOOL)
|
|
||||||
# Use otool to check if a library is using an external symbol
|
|
||||||
EXEC_PROGRAM(${CMAKE_OTOOL} ARGS "-Rv ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE OTOOL_SYMBOL)
|
|
||||||
IF(NOT OTOOL_SYMBOL MATCHES "undefined")
|
|
||||||
SET(${SYMBOL_FOUND} FALSE)
|
|
||||||
ENDIF(NOT OTOOL_SYMBOL MATCHES "undefined")
|
|
||||||
ENDIF(CMAKE_OTOOL)
|
|
||||||
IF(CMAKE_NM)
|
IF(CMAKE_NM)
|
||||||
# Use nm to check if a library is using an external symbol
|
# Use nm to check if a library is using an external symbol
|
||||||
EXEC_PROGRAM(${CMAKE_NM} ARGS "-gu ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE NM_SYMBOL)
|
EXEC_PROGRAM(${CMAKE_NM} ARGS "-gu ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE NM_SYMBOL)
|
||||||
|
MESSAGE(STATUS "Checking for undefined symbol ${SYMBOL} in ${${MYLIBRARY}}")
|
||||||
IF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
IF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
||||||
SET(${SYMBOL_FOUND} FALSE)
|
SET(${SYMBOL_FOUND} FALSE)
|
||||||
MESSAGE(STATUS "Undefined symbol ${SYMBOL} detected in ${${MYLIBRARY}}")
|
MESSAGE(STATUS "Defined symbol ${SYMBOL} detected in ${${MYLIBRARY}}")
|
||||||
ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL})
|
||||||
ENDIF(CMAKE_NM)
|
ENDIF(CMAKE_NM)
|
||||||
ELSEIF(UNIX)
|
ELSEIF(UNIX)
|
||||||
|
@ -49,7 +42,7 @@ ENDMACRO(CHECK_UNDEFINED_SYMBOL)
|
||||||
#
|
#
|
||||||
# Syntax:
|
# Syntax:
|
||||||
# CHECK_LINKED_LIBRARY(MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
# CHECK_LINKED_LIBRARY(MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
||||||
# LIBRARY_FOUND will be set to TRUE or FALSE
|
# LIBRARY_FOUND will be set to TRUE if LINKED
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# CHECK_LINKED_LIBRARY(PNG_LIBRARY ZLIB_LIBRARY ZLIB_FOUND)
|
# CHECK_LINKED_LIBRARY(PNG_LIBRARY ZLIB_LIBRARY ZLIB_FOUND)
|
||||||
|
|
Loading…
Reference in a new issue