From 81a006111d86f01359733c06c47adc73d884bd5c Mon Sep 17 00:00:00 2001 From: rw-r-r-0644 Date: Wed, 25 Sep 2019 15:46:03 +0200 Subject: [PATCH] Update instructions for cmake --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b2c4aa6..044fd5c 100644 --- a/README.md +++ b/README.md @@ -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 ` -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 @@ -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.