Skip to content

Commit 03842c2

Browse files
committed
Fix compilation on 32-bit systems
1 parent ed57cc3 commit 03842c2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/signing/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ target_link_libraries(signing
1111
target_include_directories(signing
1212
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>/src
1313
)
14+
15+
# won't work before project()! https://stackoverflow.com/a/39258832
16+
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
17+
# GPGME requires this on 32-bit systems
18+
# https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html
19+
message(WARNING "Building on 32-bit system, adding special gpgme definitions")
20+
target_compile_definitions(signing
21+
PUBLIC -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE
22+
)
23+
endif()

0 commit comments

Comments
 (0)