[CMAKE] FindDWARF.cmake: use the "include_directories" command
To tell where to find the elfutils/libdw.h, etc if they are not in the standard system include dirs, i.e. its no use to find the paths if we don't tell the cmake system to use the paths found 8) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
104a418109
commit
3c148cd84b
|
@ -12,24 +12,26 @@ if (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY)
|
|||
endif (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY)
|
||||
|
||||
find_path(DWARF_INCLUDE_DIR dwarf.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/usr/include/libdwarf
|
||||
/usr/include
|
||||
~/usr/local/include
|
||||
)
|
||||
|
||||
find_path(LIBDW_INCLUDE_DIR elfutils/libdw.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
~/usr/local/include
|
||||
)
|
||||
|
||||
find_library(DWARF_LIBRARY
|
||||
NAMES dw dwarf
|
||||
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
||||
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 ~/usr/local/lib ~/usr/local/lib64
|
||||
)
|
||||
|
||||
find_library(ELF_LIBRARY
|
||||
NAMES elf
|
||||
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
||||
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 ~/usr/local/lib ~/usr/local/lib64
|
||||
)
|
||||
|
||||
if (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY)
|
||||
|
@ -55,3 +57,4 @@ else (DWARF_FOUND)
|
|||
endif (DWARF_FOUND)
|
||||
|
||||
mark_as_advanced(DWARF_INCLUDE_DIR LIBDW_INCLUDE_DIR DWARF_LIBRARY ELF_LIBRARY)
|
||||
include_directories(${DWARF_INCLUDE_DIR} ${LIBDW_INCLUDE_DIR})
|
||||
|
|
Loading…
Reference in New Issue