From c2ec1e96068d94e5083961d53aa3bc5e8dddd6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 5 Oct 2024 18:42:47 +0800 Subject: [PATCH] CMake: fix building on Android --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ee1a67a7..065c24159 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1026,7 +1026,7 @@ if(FreeBSD AND EXISTS "/usr/local/bin/objdump") endif() endif() -if(LINUX) +if(LINUX OR ANDROID) target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__=1 _FILE_OFFSET_BITS=64) elseif(WIN32) target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE WIN32_LEAN_AND_MEAN=1 _WIN32_WINNT=0x0A00) @@ -1614,4 +1614,4 @@ fastfetch is a neofetch-like tool for fetching system information and displaying It is written mostly in C to achieve much better performance.\ ") -include(CPack) +include(CPack) \ No newline at end of file