summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c14b516..bb4037a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,6 +57,11 @@ if( WITH_BACKEND_LIBBFD )
set( LIBR_BACKEND "bfd" )
set( BACKEND_NAME "libbfd" )
+ check_include_file( libiberty.h HAVE_LIBIBERTY_H )
+ if( HAVE_LIBIBERTY_H )
+ list( APPEND BACKEND_LIBRARIES "-liberty" )
+ endif( HAVE_LIBIBERTY_H )
+
elseif( WITH_BACKEND_LIBELF )
# Is libelf 0.8.2 safe enough? testing is currently on 0.8.6
pkg_search_module( BACKEND libelf>=0.8.2 )