|
|
@ -68,7 +68,7 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
|
|
|
IF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
|
|
|
IF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
|
|
|
SET(${LIBRARY_FOUND} TRUE)
|
|
|
|
SET(${LIBRARY_FOUND} TRUE)
|
|
|
|
MESSAGE(STATUS "Library ${LIBNAME} already linked to ${${MYLIBRARY}}")
|
|
|
|
MESSAGE(STATUS "Library ${LIBNAME} already linked to ${${MYLIBRARY}}")
|
|
|
|
ENDIF(NOT OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
|
|
|
ENDIF(OTOOL_LIBRARY MATCHES "${LIBNAME}")
|
|
|
|
ENDIF(CMAKE_OTOOL)
|
|
|
|
ENDIF(CMAKE_OTOOL)
|
|
|
|
ELSEIF(UNIX)
|
|
|
|
ELSEIF(UNIX)
|
|
|
|
IF(CMAKE_OBJDUMP)
|
|
|
|
IF(CMAKE_OBJDUMP)
|
|
|
@ -76,9 +76,9 @@ MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
|
|
|
|
# TODO: under Solaris use dump -Lv <lib>
|
|
|
|
# TODO: under Solaris use dump -Lv <lib>
|
|
|
|
# Use objdump to check if a library is linked to another library
|
|
|
|
# Use objdump to check if a library is linked to another library
|
|
|
|
EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-p ${${MYLIBRARY}} | grep ${LIBNAME}" OUTPUT_VARIABLE OBJDUMP_LIBRARY)
|
|
|
|
EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-p ${${MYLIBRARY}} | grep ${LIBNAME}" OUTPUT_VARIABLE OBJDUMP_LIBRARY)
|
|
|
|
IF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
IF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
SET(${LIBRARY_FOUND} TRUE)
|
|
|
|
SET(${LIBRARY_FOUND} TRUE)
|
|
|
|
ENDIF(OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
ENDIF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED")
|
|
|
|
ENDIF(CMAKE_OBJDUMP)
|
|
|
|
ENDIF(CMAKE_OBJDUMP)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
ENDMACRO(CHECK_LINKED_LIBRARY)
|
|
|
|
ENDMACRO(CHECK_LINKED_LIBRARY)
|
|
|
|