Use ABI Manager.
authorPino Toscano <pino@debian.org>
Fri, 16 Dec 2022 17:21:09 +0000 (10:21 -0700)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 5 Jan 2023 09:17:08 +0000 (09:17 +0000)
Forwarded: not-needed

Gbp-Pq: Name enable_debianabimanager.diff

CMakeLists.txt

index 7032bde7f522fc981e057ec66f55926d60672336..7e19235c71932c4dfdaca1da89b542b48fee412b 100644 (file)
@@ -48,3 +48,20 @@ add_subdirectory(src)
 
 include(CTest)
 add_subdirectory(tests)
+
+# 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})