From 302f4aef7930c125236f071140eb9482532f2877 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 10 Jan 2023 16:22:07 -0800 Subject: [PATCH] [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. --- lldb/source/API/CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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() -- 2.34.1