Add install for samples/content.

This commit is contained in:
James Benton 2018-05-31 10:30:24 +01:00
parent 9f5066d75a
commit 9a0930e5b3
3 changed files with 10 additions and 1 deletions

View File

@ -2,5 +2,11 @@ cmake_minimum_required(VERSION 3.2)
project(samples)
include("${WUT_ROOT}/share/wut.cmake" REQUIRED)
add_subdirectory(custom_default_heap)
add_subdirectory(helloworld)
add_subdirectory(helloworld_std_thread)
add_subdirectory(gx2_triangle)
add_subdirectory(my_first_rpl)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/content/"
DESTINATION "${CMAKE_INSTALL_PREFIX}/content")

View File

@ -0,0 +1,3 @@
Samples assume that this content directory is copied to /sdcard/wut/content
e.g. For gx2_triangle /sdcard/wut/content/pos_col_shader.gsh must exist!

View File

@ -53,7 +53,7 @@ int main(int argc, char **argv)
}
sdRootPath = WHBGetSdCardMountPath();
sprintf(path, "%s/wut/pos_col_shader.gsh", sdRootPath);
sprintf(path, "%s/wut/content/pos_col_shader.gsh", sdRootPath);
gshFileData = WHBReadWholeFile(path, NULL);
if (!gshFileData) {