Skip to content

Commit

Permalink
fetch libgfxd (Kenix3#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
briaguya-ai authored May 3, 2024
1 parent 7d71a29 commit 0b4de54
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 12,047 deletions.
28 changes: 28 additions & 0 deletions cmake/dependencies/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,31 @@ target_sources(stb PRIVATE

target_include_directories(stb PUBLIC ${STB_DIR})
list(APPEND ADDITIONAL_LIB_INCLUDES ${STB_DIR})

#=================== libgfxd ===================
if (GFX_DEBUG_DISASSEMBLER)
FetchContent_Declare(
libgfxd
GIT_REPOSITORY https://github.com/glankk/libgfxd.git
GIT_TAG 008f73dca8ebc9151b205959b17773a19c5bd0da
)
FetchContent_MakeAvailable(libgfxd)

add_library(libgfxd STATIC)
set_property(TARGET libgfxd PROPERTY C_STANDARD 11)

target_sources(libgfxd PRIVATE
${libgfxd_SOURCE_DIR}/gbi.h
${libgfxd_SOURCE_DIR}/gfxd.h
${libgfxd_SOURCE_DIR}/priv.h
${libgfxd_SOURCE_DIR}/gfxd.c
${libgfxd_SOURCE_DIR}/uc.c
${libgfxd_SOURCE_DIR}/uc_f3d.c
${libgfxd_SOURCE_DIR}/uc_f3db.c
${libgfxd_SOURCE_DIR}/uc_f3dex.c
${libgfxd_SOURCE_DIR}/uc_f3dex2.c
${libgfxd_SOURCE_DIR}/uc_f3dexb.c
)

target_include_directories(libgfxd PUBLIC ${libgfxd_SOURCE_DIR})
endif()
30 changes: 0 additions & 30 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
#=================== libgfxd ===================
# This used to be included from ZAPDTR, meaning setting GFX_DEBUG_DISASSEMBLER
# required the port include ZAPDTR. The version in extern is the version that was
# in ZAPDTR, which is
# https://github.com/glankk/libgfxd/tree/008f73dca8ebc9151b205959b17773a19c5bd0da
# with a couple small changes:
# * priv.h now has `#define CONFIG_MT` added right above the #ifdef CONFIG_MT
# * the Makefile now has `CC ?= gcc` as the first line

if (GFX_DEBUG_DISASSEMBLER)
set(LIBGFXD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libgfxd)
add_library(libgfxd STATIC)
set_property(TARGET libgfxd PROPERTY C_STANDARD 11)

target_sources(libgfxd PRIVATE
${LIBGFXD_DIR}/gbi.h
${LIBGFXD_DIR}/gfxd.h
${LIBGFXD_DIR}/priv.h
${LIBGFXD_DIR}/gfxd.c
${LIBGFXD_DIR}/uc.c
${LIBGFXD_DIR}/uc_f3d.c
${LIBGFXD_DIR}/uc_f3db.c
${LIBGFXD_DIR}/uc_f3dex.c
${LIBGFXD_DIR}/uc_f3dex2.c
${LIBGFXD_DIR}/uc_f3dexb.c
)

target_include_directories(libgfxd PUBLIC ${LIBGFXD_DIR})
endif()

#=================== thread-pool ===================

set(THREADPOOL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thread-pool)
Expand Down
21 changes: 0 additions & 21 deletions extern/libgfxd/LICENSE

This file was deleted.

26 changes: 0 additions & 26 deletions extern/libgfxd/Makefile

This file was deleted.

Loading

0 comments on commit 0b4de54

Please sign in to comment.