pw_rpc: Fix CMake build

- Unset backends are set to "facade.NO_BACKEND_SET", not "".
- Always depend on the pw_sync lock annotations.

Change-Id: I84c9f0007514740a2bd97f20b3d8d2b62a372b84
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/70527
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Rob Oliver <rgoliver@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_rpc/CMakeLists.txt b/pw_rpc/CMakeLists.txt
index 83b8235..7993c83 100644
--- a/pw_rpc/CMakeLists.txt
+++ b/pw_rpc/CMakeLists.txt
@@ -65,12 +65,13 @@
     pw_function
     pw_span
     pw_status
+    pw_sync.lock_annotations
     pw_rpc.protos.pwpb
   PRIVATE_DEPS
     pw_log
 )
 
-if (NOT "${pw_sync.mutex_BACKEND}" STREQUAL "")
+if (NOT "${pw_sync.mutex_BACKEND}" STREQUAL "pw_sync.mutex.NO_BACKEND_SET")
   target_link_libraries(pw_rpc.common PUBLIC pw_sync.mutex)
 endif()
 
diff --git a/pw_sync/CMakeLists.txt b/pw_sync/CMakeLists.txt
index 8f43dd3..c0c9ce0 100644
--- a/pw_sync/CMakeLists.txt
+++ b/pw_sync/CMakeLists.txt
@@ -23,6 +23,11 @@
     pw_preprocessor
 )
 
+pw_add_module_library(pw_sync.lock_annotations
+  PUBLIC_DEPS
+    pw_preprocessor
+)
+
 pw_add_module_library(pw_sync.virtual_basic_lockable
   PUBLIC_DEPS
     pw_polyfill