diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-05 11:13:49 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-07-24 15:32:58 (GMT) |
commit | 650e61f833c2cc3ace8405a22eb80a10cfc6187c (patch) | |
tree | 5cf31f8d89fab889dc622bf5f0f751dd0cb4db3e /Source/cmInstallCommandArguments.cxx | |
parent | ff6de6d325fec9b4f257b27388be4a24fd8cadfe (diff) | |
download | CMake-650e61f833c2cc3ace8405a22eb80a10cfc6187c.zip CMake-650e61f833c2cc3ace8405a22eb80a10cfc6187c.tar.gz CMake-650e61f833c2cc3ace8405a22eb80a10cfc6187c.tar.bz2 |
Add a convenient way to add the includes install dir to the INTERFACE.
Export the INCLUDES DESTINATION without appending to the
INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target
can be exported multiple times with different INCLUDES DESTINATION
without unintended cross-pollution of export sets.
Diffstat (limited to 'Source/cmInstallCommandArguments.cxx')
-rw-r--r-- | Source/cmInstallCommandArguments.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx index 8e48f08..91ea861 100644 --- a/Source/cmInstallCommandArguments.cxx +++ b/Source/cmInstallCommandArguments.cxx @@ -203,3 +203,37 @@ bool cmInstallCommandArguments::CheckPermissions( // This is not a valid permission. return false; } + +cmInstallCommandIncludesArgument::cmInstallCommandIncludesArgument() +{ + +} + +const std::vector<std::string>& +cmInstallCommandIncludesArgument::GetIncludeDirs() const +{ + return this->IncludeDirs; +} + +void cmInstallCommandIncludesArgument::Parse( + const std::vector<std::string>* args, + std::vector<std::string>*) +{ + if(args->empty()) + { + return; + } + std::vector<std::string>::const_iterator it = args->begin(); + ++it; + for ( ; it != args->end(); ++it) + { + std::string dir = *it; + if (!cmSystemTools::FileIsFullPath(it->c_str()) + && cmGeneratorExpression::Find(*it) == std::string::npos) + { + dir = "$<INSTALL_PREFIX>/" + dir; + } + cmSystemTools::ConvertToUnixSlashes(dir); + this->IncludeDirs.push_back(dir); + } +} |