File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727
2828echo
2929echo " ***********************************"
30- echo " Unity: Skipping embedding API tests"
30+ echo " Unity: Running embedding API tests"
3131echo " ***********************************"
3232echo
33- # cd unity/embed_api_tests
34- # cmake -DCMAKE_BUILD_TYPE=$configuration .
35- # cmake --build .
36- # ./mono_test_app
37- # cd ../../
33+ cd unity/embed_api_tests
34+ cmake -DCMAKE_BUILD_TYPE=$configuration .
35+ cmake --build .
36+ ./mono_test_app
37+ cd ../../
3838
3939echo
4040echo " **********************************"
Original file line number Diff line number Diff line change @@ -10,5 +10,8 @@ include_directories(${CLR_DIR}/src/inc)
1010
1111add_executable (${PROJECT_NAME_STR} ${PROJECT_SRC_FILES} )
1212target_link_libraries (${PROJECT_NAME_STR} ${CMAKE_DL_LIBS } )
13+ if (UNIX AND NOT APPLE )
14+ target_link_libraries (${PROJECT_NAME_STR} pthread )
15+ endif ()
1316target_compile_features (${PROJECT_NAME_STR} PRIVATE cxx_range_for )
1417target_compile_definitions (${PROJECT_NAME_STR} PRIVATE ENABLE_MONO=1 PLATFORM_STANDALONE=1 )
Original file line number Diff line number Diff line change 1818#define UNITY_EDITOR 1
1919#define USE_CORECLR
2020
21- // On macOS the compiler does not define _DEBUG, but CMake defines
21+ // On macOS and Linux the compiler does not define _DEBUG, but CMake defines
2222// NDEBUG for release builds, so if NDEBUG is not defined, assume this
2323// is a debug build and define _DEBUG.
24- #if defined(__APPLE__)
24+ #if defined(__APPLE__) || defined(__linux__)
2525#ifndef NDEBUG
2626#define _DEBUG
2727#endif
@@ -89,6 +89,7 @@ void* get_handle()
8989 if (s_MonoLibrary == nullptr )
9090 {
9191 assert (false && " Failed to load mono\n " );
92+ printf (" Failed to load mono from '%s'\n " , g_monoDllPath.c_str ());
9293 exit (1 );
9394 }
9495 }
@@ -2439,8 +2440,13 @@ void SetupMono(Mode mode)
24392440#endif // __aarch64__
24402441#endif
24412442#elif defined(__linux__)
2442- monoLibFolder = " /usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.0" ;
2443- g_monoDllPath = " ../../bin/Product/Linux.x64.Debug/libcoreclr.so" ;
2443+ #if defined(_DEBUG)
2444+ monoLibFolder = abs_path_from_file (" ../../artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Debug/runtimes/linux-x64/lib/net7.0" );
2445+ g_monoDllPath = abs_path_from_file (" ../../artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Debug/runtimes/linux-x64/native/libcoreclr.so" );
2446+ #else
2447+ monoLibFolder = abs_path_from_file (" ../../artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Release/runtimes/linux-x64/lib/net7.0" );
2448+ g_monoDllPath = abs_path_from_file (" ../../artifacts/bin/microsoft.netcore.app.runtime.linux-x64/Release/runtimes/linux-x64/native/libcoreclr.so" );
2449+ #endif
24442450#elif defined(WIN32)
24452451#if defined(_DEBUG)
24462452#ifdef _M_AMD64
You can’t perform that action at this time.
0 commit comments