checkdepends_bool_v2.patch

flocke, 03/15/2011 12:48 pm

Download (1.7 kB)

code/CMakeModules/CheckDepends.cmake 2011-03-15 12:20:51.462031215 +0100
12 12
# CHECK_UNDEFINED_SYMBOL(PNG_LIBRARY inflate INFLATE_FOUND)
13 13
#
14 14
MACRO(CHECK_UNDEFINED_SYMBOL MYLIBRARY SYMBOL SYMBOL_FOUND)
15
  SET(${SYMBOL_FOUND} TRUE)
15
  SET(${SYMBOL_FOUND} FALSE)
16 16
  IF(WIN32)
17 17
    # Always TRUE under Windows because we are using static libraries
18 18
  ELSEIF(APPLE)
......
31 31
      # Use objdump to check if a library is using an external symbol
32 32
      EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-T ${${MYLIBRARY}} | grep ${SYMBOL}" OUTPUT_VARIABLE OBJDUMP_SYMBOL)
33 33
      IF(OBJDUMP_SYMBOL MATCHES "UND")
34
        SET(${SYMBOL_FOUND} FALSE)
34
        SET(${SYMBOL_FOUND} TRUE)
35 35
      ENDIF(OBJDUMP_SYMBOL MATCHES "UND")
36 36
    ENDIF(CMAKE_OBJDUMP)
37 37
  ENDIF(WIN32)
......
48 48
# CHECK_LINKED_LIBRARY(PNG_LIBRARY ZLIB_LIBRARY ZLIB_FOUND)
49 49
#
50 50
MACRO(CHECK_LINKED_LIBRARY MYLIBRARY OTHERLIBRARY LIBRARY_FOUND)
51
  SET(${LIBRARY_FOUND} FALSE)
51
  SET(${LIBRARY_FOUND} TRUE)
52 52
  IF(WIN32)
53 53
    # Always FALSE under Windows because we are using static libraries
54 54
  ELSEIF(APPLE)
......
70 70
      # Use objdump to check if a library is linked to another library
71 71
      EXEC_PROGRAM(${CMAKE_OBJDUMP} ARGS "-p ${${MYLIBRARY}} | grep ${LIBNAME}" OUTPUT_VARIABLE OBJDUMP_LIBRARY)
72 72
      IF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED")
73
        SET(${LIBRARY_FOUND} TRUE)
73
        SET(${LIBRARY_FOUND} FALSE)
74 74
      ENDIF(NOT OBJDUMP_LIBRARY MATCHES "NEEDED")
75 75
    ENDIF(CMAKE_OBJDUMP)
76 76
  ENDIF(WIN32)