79 |
79 |
add_definitions(-DQT_NO_OPENSSL)
|
80 |
80 |
endif(NOT OPENSSL_FOUND)
|
81 |
81 |
|
|
82 |
|
|
83 |
# Set up execinfo
|
|
84 |
|
|
85 |
# The problem with this library is that it is built-in in the Linux glib,
|
|
86 |
# while on systems like FreeBSD, it is installed separately and thus needs to be linked to.
|
|
87 |
# Therefore, we search for the header to see if the it's available in the first place.
|
|
88 |
# If it is available, we try to locate the library to figure out whether it is built-in or not.
|
|
89 |
|
|
90 |
find_path(EXECINFO_H_DIR "execinfo.h")
|
|
91 |
|
|
92 |
if(NOT EXECINFO_H_DIR STREQUAL "EXECINFO_H_DIR-NOTFOUND")
|
|
93 |
# We found the header file's include dir.
|
|
94 |
# Let's add it so the compiler finds it as well.
|
|
95 |
include_directories(${EXECINFO_H_DIR})
|
|
96 |
|
|
97 |
# Now determine if it's built-in or not, by searching the library file.
|
|
98 |
find_library(EXECINFO_LIB_PATH "execinfo")
|
|
99 |
|
|
100 |
if(EXECINFO_LIB_PATH STREQUAL "EXECINFO_LIB_PATH-NOTFOUND")
|
|
101 |
# Built-in, no further action is needed
|
|
102 |
message(STATUS "Found execinfo")
|
|
103 |
else(EXECINFO_LIB_PATH STREQUAL "EXECINFO_LIB_PATH-NOTFOUND")
|
|
104 |
# It's an external library, link it.
|
|
105 |
link_libraries(${EXECINFO_LIB_PATH})
|
|
106 |
message(STATUS "Found execinfo: ${EXECINFO_LIB_PATH}")
|
|
107 |
endif(EXECINFO_LIB_PATH STREQUAL "EXECINFO_LIB_PATH-NOTFOUND")
|
|
108 |
|
|
109 |
set(HAVE_EXECINFO true)
|
|
110 |
|
|
111 |
endif(NOT EXECINFO_H_DIR STREQUAL "EXECINFO_H_DIR-NOTFOUND")
|
|
112 |
|
|
113 |
if(HAVE_EXECINFO)
|
|
114 |
add_definitions(-DHAVE_EXECINFO)
|
|
115 |
endif(HAVE_EXECINFO)
|
|
116 |
|
|
117 |
|
82 |
118 |
# Select a Qt installation here, if you don't want to use system Qt
|
83 |
119 |
if(QT)
|
84 |
120 |
# FindQt4 will look for the qmake binary in $PATH, so we just prepend the Qt dir
|