mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-24 10:52:53 +00:00

the version imported is based on upstream 9c5fd60 with its bundled copies of miniz (alternative to zlib), oxygen icons and other non-relevant cruft removed. KDE integreation hardcoded having in mind it will improve (icons handling, browser integration, etc.) rebranding is not done yet and credits to the original authors and contributors are and will be left mostly intact with the exception of adding new.
29 lines
1.2 KiB
CMake
29 lines
1.2 KiB
CMake
# Set up execinfo
|
|
|
|
# The problem with this library is that it is built-in in the Linux glib,
|
|
# while on systems like FreeBSD, it is installed separately and thus needs to be linked to.
|
|
# Therefore, we search for the header to see if the it's available in the first place.
|
|
# If it is available, we try to locate the library to figure out whether it is built-in or not.
|
|
|
|
find_path(EXECINFO_INCLUDES "execinfo.h")
|
|
|
|
if(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
|
|
set(EXECINFO_INCLUDES "")
|
|
else(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
|
|
# 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")
|
|
# Built-in, no further action is needed
|
|
set(EXECINFO_LIBRARIES "")
|
|
message(STATUS "Found execinfo (built-in)")
|
|
else(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND")
|
|
# It's an external library.
|
|
message(STATUS "Found execinfo: ${EXECINFO_LIBRARIES}")
|
|
endif(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND")
|
|
|
|
set(EXECINFO_FOUND true)
|
|
|
|
endif(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
|