X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=cmake%2FFindExecInfo.cmake;h=f8599a6aacfd8825ed7ea98cf2b3408fff4330c2;hp=042a1151f5fc34353eff8605182a77434da59f49;hb=ebbd0abc75dc8c1e9e5786e3e63d478233746dd9;hpb=a2121709c6e39fe3640163e5a4b6b96b8b0f1ab8 diff --git a/cmake/FindExecInfo.cmake b/cmake/FindExecInfo.cmake index 042a1151..f8599a6a 100644 --- a/cmake/FindExecInfo.cmake +++ b/cmake/FindExecInfo.cmake @@ -7,23 +7,21 @@ find_path(EXECINFO_INCLUDES "execinfo.h") -if(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND") - set(EXECINFO_INCLUDES "") -else(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND") +if(EXECINFO_INCLUDES) # We found the header file's include dir. # Now determine if it's built-in or not, by searching the library file. find_library(EXECINFO_LIBRARIES "execinfo") - if(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND") + if(NOT EXECINFO_LIBRARIES) # Built-in, no further action is needed set(EXECINFO_LIBRARIES "") message(STATUS "Found execinfo (built-in)") - else(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND") + else() # It's an external library. message(STATUS "Found execinfo: ${EXECINFO_LIBRARIES}") - endif(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND") + endif() set(EXECINFO_FOUND true) -endif(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND") +endif()