summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2025-08-09 08:49:12 +0300
committerAlexander Golubev <fatzer2@gmail.com>2025-08-10 10:11:19 +0300
commit7bfcba48321184ee4cd4c5485196ca59b4a3a37f (patch)
tree3896a1b32b2e0d8260ae1cafa6ffa75fa419fe60 /CMakeLists.txt
parentdd898a208cf799d893bd9099fde63b1843bc88af (diff)
downloadtdelibs-7bfcba48.tar.gz
tdelibs-7bfcba48.zip
Fix build WITH_LIBBFD and libbfd 2.34+
Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/issues/368 Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit 0a9401e9c5afd3504162aab918ad84fa279a140b)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 505977a9c..baecceb88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1102,6 +1102,16 @@ if( WITH_LIBBFD )
endif( NOT HAVE_LIBBFD )
set( LIBBFD_LIBRARIES bfd )
check_include_file( "demangle.h" HAVE_DEMANGLE_H )
+
+ tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${LIBBFD_LIBRARIES}" )
+ check_c_source_compiles("
+ #define PACKAGE tdelibs
+ #define PACKAGE_VERSION \"${TDE_VERSION}\"
+ #include <bfd.h>
+ int main() {bfd_section_flags((asection *)0); return 0;} "
+ HAVE_LIBBFD_2_34_API
+ )
+ tde_restore( CMAKE_REQUIRED_LIBRARIES )
endif( WITH_LIBBFD )