Skip to content

Commit

Permalink
Use GRRLIB from repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 committed May 3, 2024
1 parent d708acc commit c1219b2
Show file tree
Hide file tree
Showing 29 changed files with 10 additions and 4,364 deletions.
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ find_library(FAT fat
PATHS "${OGC_ROOT}/lib/${OGC_SUBDIR}"
REQUIRED
)
find_library(PNGU pngu
PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib"
REQUIRED
)

find_package(PkgConfig REQUIRED)

Expand All @@ -25,17 +21,23 @@ include(FetchContent)
FetchContent_Declare(fmt
URL https://github.com/fmtlib/fmt/archive/refs/tags/10.2.1.tar.gz
)
FetchContent_Declare(grrlib
GIT_REPOSITORY https://github.com/GRRLIB/GRRLIB.git
GIT_TAG 3050dba25675452fcf66af8552e2bb4619f1bbf3
)
FetchContent_Declare(grrmod
URL https://codeload.github.com/GRRLIB/GRRMOD/tar.gz/9a6e7d85329b813d633f4b10de31c704167c0054
SOURCE_SUBDIR "GRRMOD"
)
set(GRRMOD_USE_MP3 OFF CACHE BOOL "Don't use MP3" FORCE)
FetchContent_MakeAvailable(fmt grrmod)
FetchContent_MakeAvailable(fmt grrlib grrmod)

file(GLOB_RECURSE SRC_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/source/*.c"
"${CMAKE_CURRENT_SOURCE_DIR}/fonts/*.cpp"
"${grrlib_SOURCE_DIR}/GRRLIB/GRRLIB/*.c"
"${grrlib_SOURCE_DIR}/GRRLIB/lib/pngu/*.c"
)

file(GLOB_RECURSE BIN_FILES
Expand All @@ -60,8 +62,8 @@ target_sources(Wii-Tac-Toe PRIVATE

target_include_directories(Wii-Tac-Toe PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/source"
"${CMAKE_CURRENT_SOURCE_DIR}/source/grrlib"
"${CMAKE_CURRENT_SOURCE_DIR}/source/pngu"
"${grrlib_SOURCE_DIR}/GRRLIB/GRRLIB"
"${grrlib_SOURCE_DIR}/GRRLIB/lib/pngu"
${PNG_INCLUDE_DIRS}
${JPEG_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
Expand All @@ -82,7 +84,6 @@ target_link_libraries(Wii-Tac-Toe PRIVATE
${MXML_LIBRARIES}
${FAT}
${AESND}
${PNGU}
)

ogc_create_dol(Wii-Tac-Toe)
Binary file removed lib/libpngu.a
Binary file not shown.
2 changes: 1 addition & 1 deletion source/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <wiiuse/wpad.h>
#include <ogc/conf.h>
#include <ogc/lwp_watchdog.h>
#include "grrlib/grrlib.h"
#include "grrlib.h"
#include "grrlib_class.h"
#include "fmt/format.h"
#include "fmt/chrono.h"
Expand Down
Loading

0 comments on commit c1219b2

Please sign in to comment.