summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-01-27 01:37:31 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-01-27 01:37:31 +0100
commit0e3a275c7d9b33dd6d98a44c82a8e3ed37ec97f0 (patch)
treecf6ccfe4743510562a7dfe516c4ea1f3691ec68d /CMakeLists.txt
parente6288da4f98eee77f05358aa95b710d9d5344ed1 (diff)
downloadlibr-0e3a275c7d9b33dd6d98a44c82a8e3ed37ec97f0.tar.gz
libr-0e3a275c7d9b33dd6d98a44c82a8e3ed37ec97f0.zip
Fix FTBFS with binutils 2.34.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb4037a..10f7928 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,8 @@ cmake_minimum_required( VERSION 2.6 )
project( libr )
set( PACKAGE libr )
-set( VERSION 0.6.0 )
+set( VERSION R14.1.0 )
+set( PACKAGE_VERSION 0.6.0 )
##### include essential cmake modules ###########
@@ -25,6 +26,7 @@ include( FindPkgConfig )
include( CheckIncludeFile )
include( CheckFunctionExists )
include( CheckLibraryExists )
+include( CheckSymbolExists )
##### include our cmake modules #################
@@ -53,6 +55,9 @@ if( WITH_BACKEND_LIBBFD )
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_LIBRARIES )
set( BACKEND_LIBRARIES "-lbfd" )
set( LIBR_BACKEND "bfd" )
set( BACKEND_NAME "libbfd" )
@@ -124,3 +129,7 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libr.pc
tde_auto_add_subdirectories()
+
+##### write configure files #####################
+
+configure_file( src/config.h.cmake config.h @ONLY )