mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-24 15:52:20 +00:00
Compare commits
11 commits
507186821c
...
b1fdc58bed
Author | SHA1 | Date | |
---|---|---|---|
|
b1fdc58bed | ||
|
1b5e30cb51 | ||
|
ef1a5a1350 | ||
|
b8bf87f9e8 | ||
|
b1d7144ad2 | ||
|
1510e5326b | ||
|
f80bf532ff | ||
|
ffb08c5764 | ||
|
35ddfba78a | ||
|
da0423c76d | ||
|
013da78dde |
5 changed files with 96 additions and 22 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
@ -17,9 +17,9 @@ jobs:
|
|||
|
||||
- name: Build library and examples
|
||||
run: |
|
||||
(cd GRRLIB && make clean all install)
|
||||
(cd GRRLIB/GRRLIB && make PLATFORM=cube clean all install)
|
||||
(cd examples && make)
|
||||
make -C GRRLIB clean all install
|
||||
make -C GRRLIB/GRRLIB PLATFORM=cube clean all install
|
||||
make -C examples
|
||||
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
|
|
2
.github/workflows/doc.yml
vendored
2
.github/workflows/doc.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
|||
|
||||
- name: Install doxygen
|
||||
run: |
|
||||
wget https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz -O - | tar -xzv --directory=/tmp/
|
||||
wget https://www.doxygen.nl/files/doxygen-1.12.0.linux.bin.tar.gz -O - | tar -xzv --directory=/tmp/
|
||||
cd /tmp/doxygen-*
|
||||
sudo make install
|
||||
sudo apt-get update
|
||||
|
|
|
@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
## [Unreleased][]
|
||||
|
||||
- Allow compilation and installation with cmake.
|
||||
- Added `GRRLIB_CreateEmptyTextureFmt()` to create an empty texture with a given format.
|
||||
|
||||
## [4.5.1][] - 2024-03-02
|
||||
|
|
66
CMakeLists.txt
Normal file
66
CMakeLists.txt
Normal file
|
@ -0,0 +1,66 @@
|
|||
cmake_minimum_required(VERSION 3.18)
|
||||
project(grrlib)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(PNG REQUIRED libpng)
|
||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||||
pkg_check_modules(JPEG REQUIRED libjpeg)
|
||||
|
||||
add_library(pngu STATIC)
|
||||
|
||||
target_sources(pngu
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/lib/pngu/pngu.c"
|
||||
)
|
||||
|
||||
target_include_directories(pngu
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/lib/pngu>"
|
||||
PRIVATE
|
||||
${PNG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(pngu PUBLIC
|
||||
${PNG_LIBRARIES}
|
||||
)
|
||||
|
||||
add_library(grrlib STATIC)
|
||||
|
||||
target_compile_options(grrlib
|
||||
PRIVATE
|
||||
-Wall
|
||||
-Wshadow
|
||||
-Wunused
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE GRRLIB_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB/*.c")
|
||||
target_sources(grrlib
|
||||
PRIVATE
|
||||
"${GRRLIB_SRC_FILES}"
|
||||
)
|
||||
|
||||
target_include_directories(grrlib
|
||||
PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB>"
|
||||
PRIVATE
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB/grrlib>"
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${JPEG_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(grrlib PUBLIC
|
||||
pngu
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/GRRLIB/GRRLIB/"
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING PATTERN "*.h"
|
||||
)
|
||||
|
||||
install(TARGETS pngu grrlib
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
43
README.md
43
README.md
|
@ -82,14 +82,31 @@ libjpeg is supplied via devkitPro pacman (ppc-libjpeg-turbo)
|
|||
libfat is supplied via devkitPro pacman (libfat-ogc)
|
||||
```
|
||||
|
||||
The easy way is to install GRRLIB and all the required libraries with a few
|
||||
commands:
|
||||
First, you need to make sure that all required library dependencies are installed.
|
||||
Install them with a single command:
|
||||
|
||||
```bash
|
||||
pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo
|
||||
```
|
||||
|
||||
Go to the directory where the code was downloaded:
|
||||
|
||||
```bash
|
||||
c:
|
||||
cd \grr\GRRLIB
|
||||
pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo
|
||||
make clean all install
|
||||
cd \grr
|
||||
```
|
||||
|
||||
To install GRRLIB with Make in a single command:
|
||||
|
||||
```bash
|
||||
make -C GRRLIB clean all install
|
||||
```
|
||||
|
||||
If you prefer to use CMake, it can also be installed with a few commands:
|
||||
|
||||
```bash
|
||||
/opt/devkitpro/portlibs/wii/bin/powerpc-eabi-cmake -B build
|
||||
cmake --build build --target install
|
||||
```
|
||||
|
||||
This process may take some time depending on the speed of your PC.
|
||||
|
@ -97,36 +114,26 @@ This process may take some time depending on the speed of your PC.
|
|||
If you used the method above the following steps are not required, GRRLIB is
|
||||
installed and you are ready to start developing Wii homebrew games.
|
||||
|
||||
If you want, you could install the libfat, libpng,
|
||||
libfreetype and libjpeg with there dependencies in a single command:
|
||||
|
||||
```bash
|
||||
pacman --sync --needed --noconfirm libfat-ogc ppc-libpng ppc-freetype ppc-libjpeg-turbo
|
||||
```
|
||||
|
||||
Each library could also be installed individually:
|
||||
|
||||
To install libpngu:
|
||||
|
||||
```bash
|
||||
c:
|
||||
cd \grr\GRRLIB\lib\pngu
|
||||
cd GRRLIB\lib\pngu
|
||||
make clean all install
|
||||
```
|
||||
|
||||
To install libgrrlib for Wii:
|
||||
|
||||
```bash
|
||||
c:
|
||||
cd \grr\GRRLIB\GRRLIB
|
||||
cd GRRLIB\GRRLIB
|
||||
make clean all install
|
||||
```
|
||||
|
||||
To install libgrrlib for GameCube:
|
||||
|
||||
```bash
|
||||
c:
|
||||
cd \grr\GRRLIB\GRRLIB
|
||||
cd GRRLIB\GRRLIB
|
||||
make PLATFORM=cube clean all install
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue