Skip to content

Commit 7786160

Browse files
autoantwortfacebook-github-bot
authored andcommitted
FindSodium: Do not create target unconditionally (#430)
Summary: This fixes facebook/fbthrift#429 Pull Request resolved: facebook/fbthrift#430 Reviewed By: iahs Differential Revision: D28832985 Pulled By: vitaut fbshipit-source-id: 0719f27207d11bb7970cc43c621640c425d8f55d
1 parent b70fccc commit 7786160

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

build/fbcode_builder/CMake/FindSodium.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ if(sodium_USE_STATIC_LIBS)
254254
else()
255255
set(_LIB_TYPE SHARED)
256256
endif()
257-
add_library(sodium ${_LIB_TYPE} IMPORTED)
257+
258+
if(NOT TARGET sodium)
259+
add_library(sodium ${_LIB_TYPE} IMPORTED)
260+
endif()
258261

259262
set_target_properties(sodium PROPERTIES
260263
INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}"

0 commit comments

Comments
 (0)