Skip to content

Commit

Permalink
Update instructions for cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
rw-r-r-0644 committed Sep 25, 2019
1 parent 32495f2 commit 81a0061
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
This library implements an embedded filesystem mountpoint for usage with devkitPPC aimed at the Nintendo Wii U. The implementations works by statically linking the romfs directory compressed with ustar to the executable.

### Usage
#### Library usage
Include library's header: `#include <romfs-wiiu.h>`
Call `romfsInit()` at the start of you app and `romfsExit()` before exiting
Call `romfsInit()` at the start of your app and `romfsExit()` before exiting

#### Makefile
To generate the romfs, define a ROMFS variable in you makefile containing the path of your romfs folder:

ROMFS := romfs_example_folder

Then, include romfs's makefile and add romfs target to your linking targets along with the ld flags (chage the example according to your makefile):

include $(PORTLIBS_PATH)/wiiu/share/romfs-wiiu.mk
Expand All @@ -18,6 +21,15 @@ Then, include romfs's makefile and add romfs target to your linking targets alon
LIBS += $(ROMFS_LIBS)
OFILES += $(ROMFS_TARGET)

#### cmake
Include romfs's cmake file:

include("${DEVKITPRO}/portlibs/wiiu/share/romfs-wiiu.cmake" REQUIRED)

Then, call romfs_add to build and link the romfs (make sure it's after all your_project add_executable calls):

romfs_add(your_project "romfs_example_folder")

### Installing
A prebuild version is available at the wiiu-fling pacman repository.
Please reffer to [these](https://gitlab.com/QuarkTheAwesome/wiiu-fling) instructions to set up wiiu-fling.
Expand Down

0 comments on commit 81a0061

Please sign in to comment.