Skip to content

Commit

Permalink
feat: expose the substrait io library as an installable target (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Feb 9, 2024
1 parent 4f6ed2f commit 504ce9e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/substrait/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
add_library(substrait_common Exceptions.cpp)
target_link_libraries(substrait_common fmt::fmt-header-only)

add_library(substrait_io Io.cpp)
add_library(substrait_io STATIC Io.cpp)
add_dependencies(
substrait_io
substrait_proto
Expand All @@ -12,9 +12,18 @@ add_dependencies(
fmt::fmt-header-only
absl::status
absl::statusor)
target_include_directories(
substrait_io
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../include/substrait/common>
$<INSTALL_INTERFACE:include/substrait/common>)
target_link_libraries(substrait_io substrait_proto substrait_textplan_converter
substrait_textplan_loader absl::status absl::statusor)

if(${SUBSTRAIT_CPP_BUILD_TESTING})
add_subdirectory(tests)
endif()

install(TARGETS substrait_io LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ../../../include/substrait/common/Io.h
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/substrait/common")

0 comments on commit 504ce9e

Please sign in to comment.