diff --git a/src/substrait/CMakeLists.txt b/src/substrait/CMakeLists.txt index 99adce61..528a0af0 100644 --- a/src/substrait/CMakeLists.txt +++ b/src/substrait/CMakeLists.txt @@ -18,9 +18,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY set(ADDITIONAL_CLEAN_FILES "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY};${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") -add_subdirectory(common) add_subdirectory(type) add_subdirectory(expression) add_subdirectory(function) add_subdirectory(proto) add_subdirectory(textplan) +add_subdirectory(common) diff --git a/src/substrait/common/CMakeLists.txt b/src/substrait/common/CMakeLists.txt index d706c63f..c30f5e48 100644 --- a/src/substrait/common/CMakeLists.txt +++ b/src/substrait/common/CMakeLists.txt @@ -24,9 +24,23 @@ if(${SUBSTRAIT_CPP_BUILD_TESTING}) add_subdirectory(tests) endif() -install(TARGETS substrait_io LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install( + TARGETS substrait_io + substrait_common + substrait_proto + substrait_textplan_converter + substrait_textplan_loader + substrait_base_proto_visitor + symbol_table + error_listener + substrait_type + substrait_expression + textplan_grammar + DESTINATION ${CMAKE_INSTALL_LIBDIR} + EXPORT SubstraitTargets) install(FILES ../../../include/substrait/common/Io.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/substrait/common") +install(EXPORT SubstraitTargets DESTINATION lib/cmake/Substrait) add_executable(plantransformer PlanTransformerTool.cpp) diff --git a/src/substrait/proto/CMakeLists.txt b/src/substrait/proto/CMakeLists.txt index 47af3530..a9adde5c 100644 --- a/src/substrait/proto/CMakeLists.txt +++ b/src/substrait/proto/CMakeLists.txt @@ -86,5 +86,7 @@ target_link_libraries(substrait_proto protobuf::libprotobuf) # Make sure we can see our own generated include files. target_include_directories( substrait_proto - PUBLIC "${PROTO_OUTPUT_TOPLEVEL_DIR}/src" - PUBLIC "${protobuf_SOURCE_DIR}/src") + PUBLIC $ + $ + PUBLIC $ + $) diff --git a/src/substrait/textplan/CMakeLists.txt b/src/substrait/textplan/CMakeLists.txt index 2487fb28..8a23994e 100644 --- a/src/substrait/textplan/CMakeLists.txt +++ b/src/substrait/textplan/CMakeLists.txt @@ -36,8 +36,8 @@ target_link_libraries( date::date) # Provide access to the generated protobuffer headers hierarchy. -target_include_directories(symbol_table - PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/../..") +target_include_directories( + symbol_table PUBLIC $) if(${SUBSTRAIT_CPP_BUILD_TESTING}) add_subdirectory(tests) diff --git a/src/substrait/textplan/parser/grammar/CMakeLists.txt b/src/substrait/textplan/parser/grammar/CMakeLists.txt index 47d88944..af75d9e6 100644 --- a/src/substrait/textplan/parser/grammar/CMakeLists.txt +++ b/src/substrait/textplan/parser/grammar/CMakeLists.txt @@ -55,7 +55,8 @@ add_library(textplan_grammar ${ANTLR_SubstraitPlanLexer_CXX_OUTPUTS} message(STATUS "generated dir: ${GRAMMAR_DIR}/antlr4cpp_generated_src") -target_include_directories(textplan_grammar - PUBLIC "${GRAMMAR_DIR}/antlr4cpp_generated_src") +target_include_directories( + textplan_grammar + PUBLIC $) target_link_libraries(textplan_grammar antlr4_static)