Skip to content

Commit 535e522

Browse files
committed
Add lz4 targets to be exported
1 parent 76c4f02 commit 535e522

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,22 @@ if (TARGET flatbuffers)
301301
endif()
302302
endif()
303303

304+
if (TARGET lz4)
305+
get_target_property(is_imported lz4 IMPORTED)
306+
if(NOT is_imported)
307+
# This means `lz4` was fetched using FetchContent
308+
# We need to export `lz4` target explicitly
309+
list(APPEND SPARROW_IPC_EXPORTED_TARGETS lz4)
310+
endif()
311+
endif()
312+
313+
if (TARGET lz4_static)
314+
get_target_property(is_imported lz4_static IMPORTED)
315+
if(NOT is_imported)
316+
list(APPEND SPARROW_IPC_EXPORTED_TARGETS lz4_static)
317+
endif()
318+
endif()
319+
304320
install(TARGETS ${SPARROW_IPC_EXPORTED_TARGETS}
305321
EXPORT ${PROJECT_NAME}-targets)
306322

0 commit comments

Comments
 (0)