We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbcb7ad commit d9bbc7fCopy full SHA for d9bbc7f
CMakeLists.txt
@@ -278,7 +278,15 @@ install(FILES
278
DESTINATION ${SPARROW_IPC_CMAKECONFIG_INSTALL_DIR})
279
280
# Install target
281
-install(TARGETS sparrow-ipc
+set(SPARROW_IPC_EXPORTED_TARGETS sparrow-ipc)
282
+get_target_property(is_imported flatbuffers IMPORTED)
283
+if(NOT is_imported)
284
+ # This means `flatbuffers` was fetched using FetchContent
285
+ # We need to export `flatbuffers` target explicitly
286
+ list(APPEND SPARROW_IPC_EXPORTED_TARGETS flatbuffers)
287
+endif()
288
+
289
+install(TARGETS ${SPARROW_IPC_EXPORTED_TARGETS}
290
EXPORT ${PROJECT_NAME}-targets)
291
292
install(EXPORT ${PROJECT_NAME}-targets
0 commit comments