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
24
24
)
25
25
26
26
if (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 ()
27
33
# Explanation of Emscripten-specific link flags for CppInterOpTests:
28
34
#
29
35
# MAIN_MODULE=1:
@@ -96,6 +102,13 @@ target_link_libraries(DynamicLibraryManagerTests
96
102
)
97
103
98
104
if (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 ()
99
112
# Check explanation of Emscripten-specific link flags for CppInterOpTests above for DynamicLibraryManagerTests as well.
100
113
target_link_options (DynamicLibraryManagerTests
101
114
PUBLIC "SHELL: -s MAIN_MODULE=1"
@@ -105,7 +118,7 @@ if(EMSCRIPTEN)
105
118
PUBLIC "SHELL: -s INITIAL_MEMORY=128mb"
106
119
PUBLIC "SHELL: --preload-file ${SYSROOT_PATH} /include@/include"
107
120
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"
109
122
)
110
123
endif ()
111
124
You can’t perform that action at this time.
0 commit comments