diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2017-02-09 15:05:10 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2017-02-14 21:28:07 (GMT) |
commit | f7b9bf41c5386dfc38b7a722f75b0e23a02d542b (patch) | |
tree | b82db110b72d3dd02467b43dcf2ec61da12be126 /Source | |
parent | 4bff2d14fd3010ba4aa1bfc3eda2fb2cdcc5da0f (diff) | |
download | CMake-f7b9bf41c5386dfc38b7a722f75b0e23a02d542b.zip CMake-f7b9bf41c5386dfc38b7a722f75b0e23a02d542b.tar.gz CMake-f7b9bf41c5386dfc38b7a722f75b0e23a02d542b.tar.bz2 |
Apple: Add BUILD_WITH_INSTALL_NAME_DIR target property
This new property controls whether to apply INSTALL_NAME_DIR to the
build tree. It also overrides BUILD_WITH_INSTALL_RPATH.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 6 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 5dd0261..d32bcd8 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1396,6 +1396,12 @@ bool cmGeneratorTarget::MacOSXRpathInstallNameDirDefault() const bool cmGeneratorTarget::MacOSXUseInstallNameDir() const { + const char* build_with_install_name = + this->GetProperty("BUILD_WITH_INSTALL_NAME_DIR"); + if (build_with_install_name) { + return cmSystemTools::IsOn(build_with_install_name); + } + bool use_install_name = this->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH"); return use_install_name; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index fe3472d..ad3d604 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -253,6 +253,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, this->SetPropertyDefault("WIN32_EXECUTABLE", CM_NULLPTR); this->SetPropertyDefault("MACOSX_BUNDLE", CM_NULLPTR); this->SetPropertyDefault("MACOSX_RPATH", CM_NULLPTR); + this->SetPropertyDefault("BUILD_WITH_INSTALL_NAME_DIR", CM_NULLPTR); this->SetPropertyDefault("C_CLANG_TIDY", CM_NULLPTR); this->SetPropertyDefault("C_COMPILER_LAUNCHER", CM_NULLPTR); this->SetPropertyDefault("C_CPPLINT", CM_NULLPTR); |