diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2020-06-17 18:48:49 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2020-06-18 19:35:26 (GMT) |
commit | bbcaf9689ea76d8deba13870dfc63f0654348b5a (patch) | |
tree | dee3895c9ee330b5329ef560617e765aa297bab2 /Source/cmTarget.cxx | |
parent | 14456923bd79b5353cf8be49855ac01826d89b70 (diff) | |
download | CMake-bbcaf9689ea76d8deba13870dfc63f0654348b5a.zip CMake-bbcaf9689ea76d8deba13870dfc63f0654348b5a.tar.gz CMake-bbcaf9689ea76d8deba13870dfc63f0654348b5a.tar.bz2 |
Refactor: Add IsAndroidGuiExecutable() method to cmTarget
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 36e1ad5..4091b06 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -636,6 +636,12 @@ bool cmTarget::IsAppBundleOnApple() const this->GetPropertyAsBool("MACOSX_BUNDLE")); } +bool cmTarget::IsAndroidGuiExecutable() const +{ + return (this->GetType() == cmStateEnums::EXECUTABLE && impl->IsAndroid && + this->GetPropertyAsBool("ANDROID_GUI")); +} + std::vector<cmCustomCommand> const& cmTarget::GetPreBuildCommands() const { return impl->PreBuildCommands; @@ -1865,7 +1871,7 @@ const char* cmTarget::GetSuffixVariableInternal( case cmStateEnums::RuntimeBinaryArtifact: // Android GUI application packages store the native // binary as a shared library. - return (impl->IsAndroid && this->GetPropertyAsBool("ANDROID_GUI") + return (this->IsAndroidGuiExecutable() ? "CMAKE_SHARED_LIBRARY_SUFFIX" : "CMAKE_EXECUTABLE_SUFFIX"); case cmStateEnums::ImportLibraryArtifact: @@ -1906,7 +1912,7 @@ const char* cmTarget::GetPrefixVariableInternal( case cmStateEnums::RuntimeBinaryArtifact: // Android GUI application packages store the native // binary as a shared library. - return (impl->IsAndroid && this->GetPropertyAsBool("ANDROID_GUI") + return (this->IsAndroidGuiExecutable() ? "CMAKE_SHARED_LIBRARY_PREFIX" : ""); case cmStateEnums::ImportLibraryArtifact: |