summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Dywan <christian.dywan@canonical.com>2015-07-19 18:25:09 -0400
committerChristian Dywan <christian.dywan@canonical.com>2015-07-19 18:25:09 -0400
commitfad21d10983aa9a61b724eb75832c1624d2b262c (patch)
tree9554b6373aee8b3c6d59b7e011d0f840bf463b0b /CMakeLists.txt
parent0b7aaf75a8660ba602b4a947010013b64876f343 (diff)
downloadmidori-git-fad21d10983aa9a61b724eb75832c1624d2b262c.tar.gz
Use find_file to locate execinfo.h
It may not be available in a particular libc.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 5 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 168c95bf..28225ad4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,6 +68,11 @@ if (UNIX)
if (SIGNAL)
add_definitions("-DHAVE_SIGNAL_H")
endif ()
+
+ find_file (EXEC_INFO execinfo.h)
+ if (EXEC_INFO)
+ set(VALAFLAGS ${VALAFLAGS} -D HAVE_EXECINFO_H)
+ endif ()
endif ()
find_library (X11 X11)
@@ -101,17 +106,6 @@ else ()
add_definitions("-DHAVE_OSX=0")
endif ()
-# Check if execinfo.h header exists
-string(FIND ${CMAKE_SYSTEM_NAME} "BSD" BEGIN)
-if (${BEGIN} GREATER 0)
- string(SUBSTRING ${CMAKE_SYSTEM_NAME} ${BEGIN} 3 BSD)
-else()
- set(BSD 0)
-endif()
-if (UNIX AND NOT BSD AND NOT DFLY)
- set(VALAFLAGS ${VALAFLAGS} -D HAVE_EXECINFO_H)
-endif ()
-
find_package(PkgConfig)
pkg_check_modules(DEPS REQUIRED
libxml-2.0>=2.6