提交 96c64a82 编写于 作者: J Jan Vorlicek

Add support for local copies of native dependencies on Linux

This change adds support for local copies of native dependencies for
standalone apps on Linux. If there is a folder called netcoredeps next
to the main app executable, the system dynamic loader looks into that
folder first when resolving shared library dependencies of the main app
and all of the shared libraries it transitively loads.


Commit migrated from https://github.com/dotnet/core-setup/commit/ee1d44b9edccf5f472ce2407b9cde7b8b5715bb0
上级 b71fa858
......@@ -3,6 +3,17 @@
cmake_minimum_required (VERSION 2.6)
set(DOTNET_HOST_EXE_NAME "apphost")
# Add RPATH to the apphost binary that allows using local copies of shared libraries
# dotnet core depends on for special scenarios when system wide installation of such
# dependencies is not possible for some reason.
# This cannot be enabled for MacOS (Darwin) since its RPATH works in a different way,
# doesn't apply to libraries loaded via dlopen and most importantly, it is not transitive.
if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/netcoredeps")
endif()
include(../exe.cmake)
set(SOURCES)
add_definitions(-DFEATURE_APPHOST=1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册