summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-01-29 16:14:42 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-01-29 16:14:42 +0100
commit9eb61c6ed554697aaf38513cb12aea12e46392c5 (patch)
tree322cf126795bd28305fcd7c36cab3ffc3e5e4ca2 /CMakeLists.txt
parent0e3a275c7d9b33dd6d98a44c82a8e3ed37ec97f0 (diff)
downloadlibr-9eb61c6ed554697aaf38513cb12aea12e46392c5.tar.gz
libr-9eb61c6ed554697aaf38513cb12aea12e46392c5.zip
Fix FTBFS when bfd.h is considered internal and requires PACKAGE definitions.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10f7928..9b09792 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,12 +51,14 @@ option( WITH_BACKEND_READONLY "Build with read-only backend" "OFF" )
#### configure checks ###########################
if( WITH_BACKEND_LIBBFD )
+ tde_save_and_set( CMAKE_REQUIRED_DEFINITIONS "-DPACKAGE" "-DPACKAGE_VERSION" )
check_include_file( bfd.h HAVE_BFD_H )
if( NOT HAVE_BFD_H )
tde_message_fatal( "Could not find libbfd header file (bfd.h)!\nThis file is usually included in the package binutils-dev." )
endif( NOT HAVE_BFD_H )
tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "bfd" )
check_symbol_exists( bfd_asymbol_section bfd.h HAVE_BFD_2_34 )
+ tde_restore( CMAKE_REQUIRED_DEFINITIONS )
tde_restore( CMAKE_REQUIRED_LIBRARIES )
set( BACKEND_LIBRARIES "-lbfd" )
set( LIBR_BACKEND "bfd" )