Fix doc bugs in LibIberty
[dyninst.git] / cmake / Modules / FindThreadDB.cmake
1 # - Try to find thread_db
2 # Once done this will define
3 #
4 #  THREAD_DB_FOUND - system has thread_db
5 #  THREAD_DB_INCLUDE_DIRS - the thread_db include directory
6 #  THREAD_DB_LIBRARIES - Link these to use thread_db
7 #  THREAD_DB_DEFINITIONS - Compiler switches required for using thread_db
8 #
9
10 if (THREAD_DB_LIBRARIES AND THREAD_DB_INCLUDE_DIRS)
11   set (Thread_Db_FIND_QUIETLY TRUE)
12 endif (THREAD_DB_LIBRARIES AND THREAD_DB_INCLUDE_DIRS)
13
14 find_path (THREAD_DB_INCLUDE_DIR
15     NAMES
16       thread_db.h
17     HINTS
18       ${THREAD_DB_INCLUDE_DIRS}
19     PATHS
20       /usr/include
21       /usr/include/thread_db
22       /usr/local/include
23       /opt/local/include
24       /sw/include
25       ENV CPATH) # PATH and INCLUDE will also work
26
27 find_library (THREAD_DB_LIBRARIES
28     NAMES
29       thread_db
30     HINTS
31       ${THREAD_DB_LIBRARIES}
32     PATHS
33       /usr/lib
34       /usr/lib64
35       /usr/local/lib
36       /usr/local/lib64
37       /opt/local/lib
38       /opt/local/lib64
39       /sw/lib
40       ENV LIBRARY_PATH   # PATH and LIB will also work
41       ENV LD_LIBRARY_PATH)
42 include (FindPackageHandleStandardArgs)
43
44
45 # handle the QUIETLY and REQUIRED arguments and set THREAD_DB_FOUND to TRUE
46 # if all listed variables are TRUE
47 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Thread_Db DEFAULT_MSG
48     THREAD_DB_LIBRARIES
49     THREAD_DB_INCLUDE_DIR)
50
51 #mark_as_advanced(LIBDW_INCLUDE_DIR DWARF_INCLUDE_DIR)
52 #mark_as_advanced(THREAD_DB_INCLUDE_DIRS THREAD_DB_LIBRARIES)