summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-10-07 19:58:28 (GMT)
committerBrad King <brad.king@kitware.com>2018-10-26 13:25:51 (GMT)
commit6114d85a7db0571bfade96a710f34a01bb2037c8 (patch)
tree6ce358b1f2cab1fbe0716a53546663e584565b77 /Source/cmTarget.cxx
parentbba42bb91e25a35791e71461858403360192778b (diff)
downloadCMake-6114d85a7db0571bfade96a710f34a01bb2037c8.zip
CMake-6114d85a7db0571bfade96a710f34a01bb2037c8.tar.gz
CMake-6114d85a7db0571bfade96a710f34a01bb2037c8.tar.bz2
RPATH: Add option for using $ORIGIN in build tree
This makes binaries independent of the build directory by not embedding the build directory via RPATH. The tests are partially based on the existing RuntimePath test, but with the check moved into a POST_BUILD command such that it can be skipped when the platform lacks support. Fixes: #18413
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1458f01..987bdb3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -218,6 +218,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", nullptr);
this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", nullptr);
this->SetPropertyDefault("BUILD_RPATH", nullptr);
+ this->SetPropertyDefault("BUILD_RPATH_USE_ORIGIN", nullptr);
this->SetPropertyDefault("INSTALL_NAME_DIR", nullptr);
this->SetPropertyDefault("INSTALL_RPATH", "");
this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF");