From 50b726ce3798345511a8a06129f7aab1d7d9a567 Mon Sep 17 00:00:00 2001 From: MoustaphaSaad Date: Fri, 31 May 2024 18:33:38 +0300 Subject: fix apitest added preload-file link flag to enable access to TEST_SOURCE_DIR --- tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5788805..5c7edba 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -58,6 +58,9 @@ add_executable(apitest apitest.c) target_link_libraries(apitest ${OPENSSL_TEST_LIBS}) set_source_files_properties(apitest.c PROPERTIES COMPILE_FLAGS -DCERTSDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\") +if(EMSCRIPTEN) + set_target_properties(apitest PROPERTIES LINK_FLAGS "--preload-file ${TEST_SOURCE_DIR}") +endif() add_platform_test(apitest apitest) # arc4randomforktest -- cgit v1.2.3-55-g6feb