@@ -32,6 +32,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
32
32
set (SunOS TRUE CACHE BOOL "..." FORCE)
33
33
elseif ("${CMAKE_SYSTEM_NAME} " STREQUAL "Haiku" )
34
34
set (Haiku TRUE CACHE BOOL "..." FORCE)
35
+ elseif ("${CMAKE_SYSTEM_NAME} " STREQUAL "GNU" )
36
+ set (GNU TRUE CACHE BOOL "..." FORCE)
35
37
elseif (NOT APPLE AND NOT WIN32 )
36
38
message (FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME} " )
37
39
endif ()
@@ -1192,6 +1194,83 @@ elseif(Haiku)
1192
1194
src/util/binary_linux.c
1193
1195
src/util/haiku/version .cpp
1194
1196
)
1197
+ elseif (GNU)
1198
+ list (APPEND LIBFASTFETCH_SRC
1199
+ src/common/dbus.c
1200
+ src/common/io/io_unix.c
1201
+ src/common/netif/netif_linux.c
1202
+ src/common/networking/networking_linux.c
1203
+ src/common/processing_linux.c
1204
+ src/detection/battery/battery_nosupport.c
1205
+ src/detection/bios/bios_nosupport.c
1206
+ src/detection/board/board_nosupport.c
1207
+ src/detection/bootmgr/bootmgr_nosupport.c
1208
+ src/detection/brightness/brightness_nosupport.c
1209
+ src/detection/btrfs/btrfs_nosupport.c
1210
+ src/detection/chassis/chassis_nosupport.c
1211
+ src/detection/cpu/cpu_linux.c
1212
+ src/detection/cpucache/cpucache_nosupport.c
1213
+ src/detection/cpuusage/cpuusage_linux.c
1214
+ src/detection/cursor/cursor_linux.c
1215
+ src/detection/bluetooth/bluetooth_linux.c
1216
+ src/detection/bluetoothradio/bluetoothradio_linux.c
1217
+ src/detection/disk/disk_linux.c
1218
+ src/detection/dns/dns_linux.c
1219
+ src/detection/physicaldisk/physicaldisk_nosupport.c
1220
+ src/detection/physicalmemory/physicalmemory_nosupport.c
1221
+ src/detection/diskio/diskio_nosupport.c
1222
+ src/detection/displayserver/linux/displayserver_linux.c
1223
+ src/detection/displayserver/linux/drm.c
1224
+ src/detection/displayserver/linux/wayland/wayland.c
1225
+ src/detection/displayserver/linux/wayland/global -output .c
1226
+ src/detection/displayserver/linux/wayland/zwlr-output .c
1227
+ src/detection/displayserver/linux/wayland/wlr-output -management-unstable-v1-protocol.c
1228
+ src/detection/displayserver/linux/wmde.c
1229
+ src/detection/displayserver/linux/xcb.c
1230
+ src/detection/displayserver/linux/xlib.c
1231
+ src/detection/font/font_linux.c
1232
+ src/detection/gpu/gpu_nosupport.c
1233
+ src/detection/gpu/gpu_pci.c
1234
+ src/detection/gtk_qt/gtk.c
1235
+ src/detection/host/host_nosupport.c
1236
+ src/detection/icons/icons_linux.c
1237
+ src/detection/initsystem/initsystem_linux.c
1238
+ src/detection/keyboard/keyboard_nosupport.c
1239
+ src/detection/libc/libc_linux.c
1240
+ src/detection/lm/lm_linux.c
1241
+ src/detection/loadavg/loadavg_linux.c
1242
+ src/detection/locale/locale_linux.c
1243
+ src/detection/localip/localip_linux.c
1244
+ src/detection/gamepad/gamepad_nosupport.c
1245
+ src/detection/media/media_linux.c
1246
+ src/detection/memory/memory_linux.c
1247
+ src/detection/mouse/mouse_nosupport.c
1248
+ src/detection/netio/netio_nosupport.c
1249
+ src/detection/opengl/opengl_linux.c
1250
+ src/detection/os/os_linux.c
1251
+ src/detection/packages/packages_linux.c
1252
+ src/detection/poweradapter/poweradapter_nosupport.c
1253
+ src/detection/processes/processes_linux.c
1254
+ src/detection/gtk_qt/qt.c
1255
+ src/detection/sound/sound_linux.c
1256
+ src/detection/swap/swap_linux.c
1257
+ src/detection/terminalfont/terminalfont_linux.c
1258
+ src/detection/terminalshell/terminalshell_linux.c
1259
+ src/detection/terminalsize/terminalsize_linux.c
1260
+ src/detection/theme/theme_linux.c
1261
+ src/detection/tpm/tpm_nosupport.c
1262
+ src/detection/uptime/uptime_linux.c
1263
+ src/detection/users/users_linux.c
1264
+ src/detection/wallpaper/wallpaper_linux.c
1265
+ src/detection/wifi/wifi_linux.c
1266
+ src/detection/wm/wm_nosupport.c
1267
+ src/detection/de/de_linux.c
1268
+ src/detection/wmtheme/wmtheme_linux.c
1269
+ src/detection/camera/camera_nosupport.c
1270
+ src/detection/zpool/zpool_nosupport.c
1271
+ src/util/platform/FFPlatform_unix.c
1272
+ src/util/binary_linux.c
1273
+ )
1195
1274
endif ()
1196
1275
1197
1276
if (ENABLE_DIRECTX_HEADERS)
@@ -1315,6 +1394,10 @@ elseif(NetBSD)
1315
1394
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/X11R7/lib -Wl,-rpath,/usr/pkg/lib" ) # ditto
1316
1395
elseif (Haiku)
1317
1396
target_compile_definitions (libfastfetch PUBLIC _GNU_SOURCE)
1397
+ elseif (GNU)
1398
+ target_compile_definitions (libfastfetch PUBLIC _GNU_SOURCE)
1399
+ # On Hurd PATH_MAX is not defined. Set an arbitrary limit as workaround.
1400
+ target_compile_definitions (libfastfetch PUBLIC PATH_MAX=4096)
1318
1401
endif ()
1319
1402
1320
1403
if (FreeBSD OR OpenBSD OR NetBSD)
@@ -1639,6 +1722,10 @@ elseif(SunOS)
1639
1722
PRIVATE "nvpair"
1640
1723
PRIVATE "devinfo"
1641
1724
)
1725
+ elseif (GNU)
1726
+ target_link_libraries (libfastfetch
1727
+ PRIVATE "m"
1728
+ )
1642
1729
elseif (ANDROID)
1643
1730
CHECK_LIBRARY_EXISTS(-l:libandroid-wordexp.a wordexp "" HAVE_LIBANDROID_WORDEXP_STATIC)
1644
1731
if (HAVE_LIBANDROID_WORDEXP_STATIC)
0 commit comments