Skip to content

Commit c68175f

Browse files
committed
crimson/CMakeLists: simplify crimson-common deps
instead of appending conditional dependencies to crimson-common with crimson_common_deps and crimson_common_public_deps, use target_link_libraries directly. Signed-off-by: Matan Breizman <[email protected]>
1 parent d9314c5 commit c68175f

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

src/crimson/CMakeLists.txt

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -126,30 +126,17 @@ target_compile_definitions(crimson-common PRIVATE
126126
"CEPH_INSTALL_FULL_PKGLIBDIR=\"${CEPH_INSTALL_FULL_PKGLIBDIR}\""
127127
"CEPH_INSTALL_DATADIR=\"${CEPH_INSTALL_DATADIR}\"")
128128

129-
set(crimson_common_deps
130-
Boost::iostreams
131-
Boost::random
132-
json_spirit)
133-
134-
set(crimson_common_public_deps crimson::cflags)
135-
if(WITH_JAEGER)
136-
list(APPEND crimson_common_public_deps jaeger_base)
137-
endif()
138-
139-
if(WITH_BREAKPAD)
140-
list(APPEND crimson_common_deps Breakpad::client)
141-
endif()
142-
143-
if(NOT WITH_SYSTEM_BOOST)
144-
list(APPEND crimson_common_deps ${ZLIB_LIBRARIES})
145-
endif()
146-
147129
target_link_libraries(crimson-common
148130
PUBLIC
149-
${crimson_common_public_deps}
131+
$<$<BOOL:${WITH_JAEGER}>:jaeger_base>
132+
crimson::cflags
150133
PRIVATE
151134
crc32 arch
152-
${crimson_common_deps}
135+
Boost::iostreams
136+
Boost::random
137+
json_spirit
138+
$<$<NOT:$<BOOL:${WITH_SYSTEM_BOOST}>>:${ZLIB_LIBRARIES}>
139+
$<$<BOOL:${WITH_BREAKPAD}>:Breakpad::client>
153140
OpenSSL::Crypto)
154141

155142
set(crimson_auth_srcs

0 commit comments

Comments
 (0)