File tree Expand file tree Collapse file tree 2 files changed +21
-7
lines changed
Expand file tree Collapse file tree 2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ set (target_name yup_tests)
5252set (target_version "1.0.0" )
5353set (target_console OFF )
5454set (target_gtest_modules "" )
55+ set (target_preloaded "" )
5556set (target_modules
5657 yup_core
5758 yup_audio_basics
@@ -76,6 +77,12 @@ else()
7677 list (APPEND target_gtest_modules
7778 GTest::gtest_main
7879 GTest::gmock_main)
80+
81+ file (GLOB_RECURSE data_files "${CMAKE_CURRENT_LIST_DIR} /data/*" )
82+ foreach (data_file ${data_files} )
83+ file (RELATIVE_PATH rel_path "${CMAKE_CURRENT_LIST_DIR} " "${data_file} " )
84+ list (APPEND target_preloaded "${data_file} @${rel_path} " )
85+ endforeach ()
7986endif ()
8087
8188if (YUP_PLATFORM_MAC) # OR YUP_PLATFORM_WINDOWS)
@@ -105,11 +112,13 @@ yup_standalone_app (
105112 DEFINITIONS
106113 YUP_USE_CURL=0
107114 YUP_MODAL_LOOPS_PERMITTED=1
115+ PRELOAD_FILES
116+ ${target_preloaded}
108117 MODULES
109118 ${target_modules}
110119 ${target_gtest_modules} )
111120
112- # ==== (Only For Testing) Setup FFTW3
121+ # ==== (Only For Manual Testing) Setup FFTW3
113122# _yup_find_fftw3 (${target_name})
114123
115124# ==== Setup sources
Original file line number Diff line number Diff line change @@ -29,12 +29,17 @@ namespace
2929{
3030File getValidFontFile ()
3131{
32- return File (__FILE__)
33- .getParentDirectory ()
34- .getParentDirectory ()
35- .getChildFile (" data" )
36- .getChildFile (" fonts" )
37- .getChildFile (" Linefont-VariableFont_wdth,wght.ttf" );
32+ return
33+ #if YUP_EMSCRIPTEN
34+ File (" /" )
35+ #else
36+ File (__FILE__)
37+ #endif
38+ .getParentDirectory ()
39+ .getParentDirectory ()
40+ .getChildFile (" data" )
41+ .getChildFile (" fonts" )
42+ .getChildFile (" Linefont-VariableFont_wdth,wght.ttf" );
3843}
3944} // namespace
4045
You can’t perform that action at this time.
0 commit comments