diff options
author | Slávek Banko <[email protected]> | 2020-01-29 16:14:42 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-01-29 17:26:35 +0100 |
commit | 1f96ba31a29d46e724eac80afecf808916b27906 (patch) | |
tree | 4af290c072536facf75a6e1d8e2ded9b1a164471 | |
parent | 40ea76aed7dcf2d50d25b1ffa173746d2d17492f (diff) | |
download | libr-1f96ba31a29d46e724eac80afecf808916b27906.tar.gz libr-1f96ba31a29d46e724eac80afecf808916b27906.zip |
Fix FTBFS when bfd.h is considered internal and requires PACKAGE definitions.
Signed-off-by: Slávek Banko <[email protected]>
(cherry picked from commit 9eb61c6ed554697aaf38513cb12aea12e46392c5)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/config.h.cmake | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 95c8119..e3d0fb9 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" ) diff --git a/src/config.h.cmake b/src/config.h.cmake index 5b0870f..34fe955 100644 --- a/src/config.h.cmake +++ b/src/config.h.cmake @@ -1,3 +1,8 @@ +/* Define name of package. */ +#define PACKAGE "@PACKAGE@" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@PACKAGE_VERSION@" /* Define to 1 if translation of program messages to the user's native language is requested. */ |