summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-02-14 17:34:25 +0100
committerKamil Rytarowski <n54@gmx.com>2016-02-17 02:36:26 +0100
commit4716674cb18b998dcf6c8dd1b9eb24fba282035e (patch)
treef4421bac1b73c9c5e24139055a7b05773d349b87 /CMakeLists.txt
parenta1c870d555a73618a8ed9c2d26e523eb7e71ab36 (diff)
downloadcoreclr-4716674cb18b998dcf6c8dd1b9eb24fba282035e.tar.gz
coreclr-4716674cb18b998dcf6c8dd1b9eb24fba282035e.tar.bz2
coreclr-4716674cb18b998dcf6c8dd1b9eb24fba282035e.zip
Fix build issue on NetBSD: Make RPATH optional and user-settable
The `$ORIGIN` linker feature isn't supported on NetBSD. All RPATH is done via `pkgsrc` on all supported platforms, allow to override it. pkgsrc will set CORECLR_SET_RPATH:BOOL=OFF and specify manually needed options.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2cc5393f6f..7fdee71d93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,8 +4,12 @@ cmake_minimum_required(VERSION 2.8.12)
# Set the project name
project(CoreCLR)
-# Enable @rpath support for shared libraries.
-set(MACOSX_RPATH ON)
+set(CORECLR_SET_RPATH ON)
+
+if(CORECLR_SET_RPATH)
+ # Enable @rpath support for shared libraries.
+ set(MACOSX_RPATH ON)
+endif(CORECLR_SET_RPATH)
if(CMAKE_VERSION VERSION_EQUAL 3.0 OR CMAKE_VERSION VERSION_GREATER 3.0)
cmake_policy(SET CMP0042 NEW)