From 551b67b170b05bafade9a7533e0766c8fa4fcc9e Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 20 Jun 2022 12:59:16 +0200 Subject: [PATCH 1/2] Expose -DBUILD_WITHOUT_64BIT_OFFSET to allow building for 32bit Android. --- port/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/port/CMakeLists.txt b/port/CMakeLists.txt index 29310e13baa9..94d7a6b59d61 100644 --- a/port/CMakeLists.txt +++ b/port/CMakeLists.txt @@ -136,6 +136,10 @@ if (WIN32) target_sources(cpl PRIVATE cpl_vsil_win32.cpp) else () target_sources(cpl PRIVATE cpl_vsil_unix_stdio_64.cpp) + set(BUILD_WITHOUT_64BIT_OFFSET OFF CACHE BOOL "Build GDAL without > 4GB file support. If file API does not seem to support 64-bit offset.") + if(BUILD_WITHOUT_64BIT_OFFSET) + target_compile_definitions(cpl PRIVATE -DBUILD_WITHOUT_64BIT_OFFSET) + endif() endif () if (HAVE_SSSE3_AT_COMPILE_TIME) From 3f73ee079380b3f19835bb0ed3b665257ed87d84 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 20 Jun 2022 15:12:34 +0200 Subject: [PATCH 2/2] Update port/CMakeLists.txt Co-authored-by: Matthias Kuhn --- port/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/port/CMakeLists.txt b/port/CMakeLists.txt index 94d7a6b59d61..90745b02c3cb 100644 --- a/port/CMakeLists.txt +++ b/port/CMakeLists.txt @@ -137,6 +137,7 @@ if (WIN32) else () target_sources(cpl PRIVATE cpl_vsil_unix_stdio_64.cpp) set(BUILD_WITHOUT_64BIT_OFFSET OFF CACHE BOOL "Build GDAL without > 4GB file support. If file API does not seem to support 64-bit offset.") + mark_as_advanced(BUILD_WITHOUT_64BIT_OFFSET) if(BUILD_WITHOUT_64BIT_OFFSET) target_compile_definitions(cpl PRIVATE -DBUILD_WITHOUT_64BIT_OFFSET) endif()