Skip to content

Commit e15fd5f

Browse files
committed
Rewrite signing using gpgme and gcrypt
1 parent ed692d7 commit e15fd5f

File tree

4 files changed

+445
-374
lines changed

4 files changed

+445
-374
lines changed

src/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ include(build-runtime.cmake)
1818

1919
add_executable(appimagetool
2020
appimagetool.c
21+
appimagetool_sign.c
2122
binreloc.c
2223
runtime_embed.o
2324
)
@@ -27,6 +28,12 @@ target_include_directories(appimagetool
2728
INTERFACE $<INSTALL_INTERFACE:include/>
2829
)
2930

31+
# required for appimagetool's signing
32+
# we're using CMake's functionality directly, since we want to link those statically
33+
find_package(PkgConfig)
34+
pkg_check_modules(libgpgme REQUIRED gpgme IMPORTED_TARGET)
35+
pkg_check_modules(libgcrypt REQUIRED libgcrypt IMPORTED_TARGET)
36+
3037
# trick: list libraries on which imported static ones depend on in the PUBLIC section
3138
# CMake then adds them after the PRIVATE ones in the linker command
3239
target_link_libraries(appimagetool
@@ -37,6 +44,8 @@ target_link_libraries(appimagetool
3744
libglib
3845
libgio
3946
libzlib
47+
PkgConfig::libgcrypt
48+
PkgConfig::libgpgme
4049
xz
4150
)
4251

0 commit comments

Comments
 (0)