From 81f1791fbe903a8975ebe7ab9bd38572e6a4d150 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 2 Nov 2010 10:45:37 +0100 Subject: [PATCH] Changed: #1152 FindLibwww does not make all needed libs link to ryzom_client --- code/CMakeModules/CheckDepends.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/CMakeModules/CheckDepends.cmake b/code/CMakeModules/CheckDepends.cmake index abbae21ac..6d943d9c2 100644 --- a/code/CMakeModules/CheckDepends.cmake +++ b/code/CMakeModules/CheckDepends.cmake @@ -27,10 +27,10 @@ MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND) ENDIF(CMAKE_OTOOL) IF(CMAKE_NM) # Use nm to check if a library is using an external symbol - EXEC_PROGRAM(${CMAKE_NM} ARGS "-Dgu ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE NM_SYMBOL) - IF(NOT NM_SYMBOL MATCHES ${SYMBOL}) + EXEC_PROGRAM(${CMAKE_NM} ARGS "-gu ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE NM_SYMBOL) + IF(NOT NM_SYMBOL MATCHES " U ") SET(${SYMBOL_FOUND} FALSE) - ENDIF(NOT NM_SYMBOL MATCHES ${SYMBOL}) + ENDIF(NOT NM_SYMBOL MATCHES " U ") ENDIF(CMAKE_NM) ELSEIF(UNIX) IF(CMAKE_OBJDUMP) @@ -61,8 +61,8 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND) SET(CMAKE_OTOOL otool) IF(CMAKE_OTOOL) # Use otool to check if a library is linked to another library - GET_FILENAME_COMPONENT(LIBNAME ${${OTHERLIBRARY}} NAME) - EXEC_PROGRAM(${CMAKE_OTOOL} ARGS "-L ${${MYLIBRARY}} | grep ${${OTHERLIBRARY}}" OUTPUT_VARIABLE OTOOL_LIBRARY) + GET_FILENAME_COMPONENT(LIBNAME ${${OTHERLIBRARY}} NAME_WE) + EXEC_PROGRAM(${CMAKE_OTOOL} ARGS "-L ${${MYLIBRARY}} | grep ${LIBNAME}" OUTPUT_VARIABLE OTOOL_LIBRARY) IF(NOT OTOOL_LIBRARY MATCHES "${LIBNAME}") SET(${LIBRARY_FOUND} FALSE) ENDIF(NOT OTOOL_LIBRARY MATCHES "${LIBNAME}")