From: Jonas Devlieghere Date: Wed, 11 Jan 2023 00:22:07 +0000 (-0800) Subject: [lldb] Only add lldb-framework-cleanup dependency to existing targets X-Git-Tag: upstream/17.0.6~21473 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=302f4aef7930c125236f071140eb9482532f2877;p=platform%2Fupstream%2Fllvm.git [lldb] Only add lldb-framework-cleanup dependency to existing targets The Xcode standalone build doesn't have the install-liblldb and install-liblldb-stripped targets. Fix the resulting CMake error "Cannot add target-level dependencies to non-existent target" by only adding the dependency when the targets exist. --- diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt index f3c8814fcc82..3e189f387f1c 100644 --- a/lldb/source/API/CMakeLists.txt +++ b/lldb/source/API/CMakeLists.txt @@ -212,8 +212,13 @@ endif() if(LLDB_BUILD_FRAMEWORK) include(LLDBFramework) - add_dependencies(install-liblldb - lldb-framework-cleanup) - add_dependencies(install-liblldb-stripped - lldb-framework-cleanup) + if (TARGET install-liblldb) + add_dependencies(install-liblldb + lldb-framework-cleanup) + endif() + + if (TARGET install-liblldb-stripped) + add_dependencies(install-liblldb-stripped + lldb-framework-cleanup) + endif() endif()