File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ add_cppinterop_unittest(CppInterOpTests
2424)
2525
2626if (EMSCRIPTEN)
27+ if (SYSROOT_PATH MATCHES "@" )
28+ execute_process (
29+ COMMAND ln -s ${SYSROOT_PATH} ${CMAKE_CURRENT_BINARY_DIR}
30+ )
31+ set (SYSROOT_PATH "./sysroot/" )
32+ endif ()
2733 # Explanation of Emscripten-specific link flags for CppInterOpTests:
2834 #
2935 # MAIN_MODULE=1:
@@ -96,6 +102,13 @@ target_link_libraries(DynamicLibraryManagerTests
96102)
97103
98104if (EMSCRIPTEN)
105+ set (TEST_SHARED_LIBRARY_PATH "${CMAKE_CURRENT_BINARY_DIR} /TestSharedLib/unittests/bin/Release/" )
106+ if (TEST_SHARED_LIBRARY_PATH MATCHES "@" )
107+ execute_process (
108+ COMMAND ln -s ${TEST_SHARED_LIBRARY_PATH} ${CMAKE_CURRENT_BINARY_DIR}
109+ )
110+ set (TEST_SHARED_LIBRARY_PATH "./Release/" )
111+ endif ()
99112 # Check explanation of Emscripten-specific link flags for CppInterOpTests above for DynamicLibraryManagerTests as well.
100113 target_link_options (DynamicLibraryManagerTests
101114 PUBLIC "SHELL: -s MAIN_MODULE=1"
@@ -105,7 +118,7 @@ if(EMSCRIPTEN)
105118 PUBLIC "SHELL: -s INITIAL_MEMORY=128mb"
106119 PUBLIC "SHELL: --preload-file ${SYSROOT_PATH} /include@/include"
107120 PUBLIC "SHELL: --emrun"
108- PUBLIC "SHELL: --preload-file ${CMAKE_CURRENT_BINARY_DIR} /TestSharedLib/unittests/bin/Release /libTestSharedLib.so@/libTestSharedLib.so"
121+ PUBLIC "SHELL: --preload-file ${TEST_SHARED_LIBRARY_PATH} /libTestSharedLib.so@/libTestSharedLib.so"
109122 )
110123endif ()
111124
You can’t perform that action at this time.
0 commit comments