From e9ffff6a864043f69fc4d84f284c7bd64008b4ba Mon Sep 17 00:00:00 2001 From: Marqin Date: Tue, 15 Dec 2015 01:48:58 +0100 Subject: Link unixcoreruncommon with dl, which is needed on Unix-like systems to use dynamic linking. --- src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt b/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt index 2b5831e6d9..cecfd77f82 100644 --- a/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt +++ b/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt @@ -5,3 +5,4 @@ add_library(unixcoreruncommon coreruncommon.cpp ) +target_link_libraries(unixcoreruncommon dl) -- cgit v1.2.3 From ff918aa714673aad1c828cb023ccbfad7cc447ec Mon Sep 17 00:00:00 2001 From: Marqin Date: Tue, 15 Dec 2015 02:22:48 +0100 Subject: Add if to check if Linux for -ldl, because it only works on Linux. --- src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt b/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt index cecfd77f82..92c5cfd8b2 100644 --- a/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt +++ b/src/coreclr/hosts/unixcoreruncommon/CMakeLists.txt @@ -5,4 +5,6 @@ add_library(unixcoreruncommon coreruncommon.cpp ) -target_link_libraries(unixcoreruncommon dl) +if(CLR_CMAKE_PLATFORM_LINUX) + target_link_libraries(unixcoreruncommon dl) +endif(CLR_CMAKE_PLATFORM_LINUX) -- cgit v1.2.3