aboutsummaryrefslogtreecommitdiff
path: root/ports/proxygen/fix-duplicated-target.patch
blob: 89d32e53db647df50353b3a5e7dc55d95950129f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/build/fbcode_builder/CMake/FindSodium.cmake b/build/fbcode_builder/CMake/FindSodium.cmake
index c664ccbe3..3c3f1245c 100644
--- a/build/fbcode_builder/CMake/FindSodium.cmake
+++ b/build/fbcode_builder/CMake/FindSodium.cmake
@@ -254,7 +254,10 @@ if(sodium_USE_STATIC_LIBS)
 else()
     set(_LIB_TYPE SHARED)
 endif()
-add_library(sodium ${_LIB_TYPE} IMPORTED)
+
+if(NOT TARGET sodium)
+    add_library(sodium ${_LIB_TYPE} IMPORTED)
+endif()
 
 set_target_properties(sodium PROPERTIES
     INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}"