mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Chore: embed yyjson source code
Ref: https://github.com/fastfetch-cli/fastfetch/discussions/523
This commit is contained in:
+2
-22
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url & FetchContent
|
||||
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
|
||||
|
||||
project(fastfetch
|
||||
VERSION 2.0.0
|
||||
@@ -36,24 +36,6 @@ endif()
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
||||
include(FetchContent)
|
||||
function(ff_fetch_dep package repo tag)
|
||||
FetchContent_Declare(
|
||||
"${package}"
|
||||
GIT_REPOSITORY "${repo}"
|
||||
GIT_TAG "${tag}"
|
||||
GIT_PROGRESS TRUE
|
||||
)
|
||||
FetchContent_GetProperties("${package}")
|
||||
if(NOT ${package}_POPULATED)
|
||||
message("-- Fetching dependency ${package}@${tag} from ${repo}")
|
||||
FetchContent_Populate(${package})
|
||||
add_subdirectory(${${package}_SOURCE_DIR} ${${package}_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
ff_fetch_dep(yyjson "https://github.com/ibireme/yyjson" "0.7.0")
|
||||
|
||||
#####################
|
||||
# Configure options #
|
||||
#####################
|
||||
@@ -269,6 +251,7 @@ file(GENERATE OUTPUT logo_builtin.h CONTENT "${LOGO_BUILTIN_H}")
|
||||
#######################
|
||||
|
||||
set(LIBFASTFETCH_SRC
|
||||
src/3rdparty/yyjson/yyjson.c
|
||||
src/common/bar.c
|
||||
src/common/font.c
|
||||
src/common/format.c
|
||||
@@ -847,7 +830,6 @@ target_include_directories(libfastfetch
|
||||
|
||||
target_link_libraries(libfastfetch
|
||||
PRIVATE ${CMAKE_DL_LIBS}
|
||||
PRIVATE yyjson
|
||||
)
|
||||
|
||||
######################
|
||||
@@ -862,7 +844,6 @@ target_compile_definitions(fastfetch
|
||||
)
|
||||
target_link_libraries(fastfetch
|
||||
PRIVATE libfastfetch
|
||||
PRIVATE yyjson
|
||||
)
|
||||
|
||||
add_executable(flashfetch
|
||||
@@ -873,7 +854,6 @@ target_compile_definitions(flashfetch
|
||||
)
|
||||
target_link_libraries(flashfetch
|
||||
PRIVATE libfastfetch
|
||||
PRIVATE yyjson
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"home": "https://github.com/ibireme/yyjson",
|
||||
"license": "MIT ( embed in source )",
|
||||
"version": "5e3b26d2659287d31e2f8e10f95f95feb7e5ab3a",
|
||||
"author": "ibireme"
|
||||
}
|
||||
Vendored
+9281
File diff suppressed because it is too large
Load Diff
Vendored
+7846
File diff suppressed because it is too large
Load Diff
@@ -62,7 +62,6 @@ FF_MAYBE_UNUSED static void detectTTY(FFTerminalFontResult* terminalFont)
|
||||
#include "common/processing.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <yyjson.h>
|
||||
|
||||
static const char* detectWTProfile(yyjson_val* profile, FFstrbuf* name, double* size)
|
||||
{
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <yyjson.h>
|
||||
|
||||
#include "3rdparty/yyjson/yyjson.h"
|
||||
|
||||
#include "util/FFstrbuf.h"
|
||||
#include "util/FFlist.h"
|
||||
|
||||
Reference in New Issue
Block a user