Unhide buffer when joining or querying and it was temporarily hidden. fixes #866
[quassel.git] / cmake / modules / FindExecInfo.cmake
1 # Set up execinfo
2
3 # The problem with this library is that it is built-in in the Linux glib,
4 # while on systems like FreeBSD, it is installed separately and thus needs to be linked to.
5 # Therefore, we search for the header to see if the it's available in the first place.
6 # If it is available, we try to locate the library to figure out whether it is built-in or not.
7
8 find_path(EXECINFO_INCLUDES "execinfo.h")
9
10 if(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
11   set(EXECINFO_INCLUDES "")
12 else(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
13   # We found the header file's include dir.
14
15   # Now determine if it's built-in or not, by searching the library file.
16   find_library(EXECINFO_LIBRARIES "execinfo")
17
18   if(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND")
19     # Built-in, no further action is needed
20     set(EXECINFO_LIBRARIES "")
21     message(STATUS "Found execinfo (built-in)")
22   else(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND")
23     # It's an external library.
24     message(STATUS "Found execinfo: ${EXECINFO_LIBRARIES}")
25   endif(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND")
26
27   set(EXECINFO_FOUND true)
28
29 endif(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")