From 0339ddd8a7ceeda256d71543d4f06571894c17ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jostein=20Kj=C3=B8nigsen?= Date: Mon, 4 Feb 2019 19:35:30 +0100 Subject: [PATCH] Fix dotnet exe portability between FreeBSD versions. (dotnet/core-setup#5072) Link pthread in resulting binary. Commit migrated from https://github.com/dotnet/core-setup/commit/5b37f4db5de5c1753d494d93a2ca277595266a3c --- src/installer/corehost/cli/exe.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/installer/corehost/cli/exe.cmake b/src/installer/corehost/cli/exe.cmake index 4ef768c..93e4863 100644 --- a/src/installer/corehost/cli/exe.cmake +++ b/src/installer/corehost/cli/exe.cmake @@ -56,8 +56,13 @@ if (WIN32 AND CLI_CMAKE_PLATFORM_ARCH_ARM) target_link_libraries(${DOTNET_HOST_EXE_NAME} shell32.lib) endif() +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD") + target_link_libraries (${DOTNET_HOST_EXE_NAME} "pthread") +endif() + if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_link_libraries (${DOTNET_HOST_EXE_NAME} "dl" "pthread") + target_link_libraries (${DOTNET_HOST_EXE_NAME} "dl") endif() + -- 2.7.4