From: Pino Toscano Date: Fri, 16 Dec 2022 17:21:09 +0000 (-0700) Subject: Use ABI Manager. X-Git-Tag: archive/raspbian/1.0.4-5-3+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=897fd417e77797d27c090a1b81febb76f7970176;p=libappimage.git Use ABI Manager. Forwarded: not-needed Gbp-Pq: Name enable_debianabimanager.diff --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b9bb00a..723dd8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,3 +52,20 @@ add_subdirectory(src) if(BUILD_TESTING) add_subdirectory(tests) endif() + +# XXX workaround the fact that DebianABIManager only works if the build type +# is "Debian" +set(OLD_CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}) +set(CMAKE_BUILD_TYPE "Debian") +include(/usr/share/pkg-kde-tools/cmake/DebianABIManager.cmake) +# XXX kludge: append the "Debian" link flags created by DebianABIManager +# to the actually used link flags +get_target_property(debabi_link_flags libappimage LINK_FLAGS_DEBIAN) +get_target_property(link_flags libappimage LINK_FLAGS) +if(NOT(link_flags) OR (link_flags STREQUAL "NOTFOUND")) + set(link_flags "") +endif() +set_target_properties(libappimage PROPERTIES LINK_FLAGS ${link_flags} ${debabi_link_flags}) +# XXX reset the build type to what was originally set, as it apparently +# does make a difference to cmake +set(CMAKE_BUILD_TYPE ${OLD_CMAKE_BUILD_TYPE})