diff --git a/src/substrait/proto/CMakeLists.txt b/src/substrait/proto/CMakeLists.txt index 3adc873d..a1176ccf 100644 --- a/src/substrait/proto/CMakeLists.txt +++ b/src/substrait/proto/CMakeLists.txt @@ -79,7 +79,10 @@ endforeach() # Add the generated protobuf C++ files to our exported library. add_library(substrait_proto ${PROTO_SRCS} ${PROTO_HDRS} ProtoUtils.cpp ProtoUtils.h) -set_target_properties(substrait_proto PROPERTIES PUBLIC_HEADER "${PROTO_HDRS}") +target_sources( + substrait_proto PUBLIC FILE_SET HEADERS BASE_DIRS + ${PROTO_OUTPUT_TOPLEVEL_DIR} FILES ${PROTO_HDRS}) +# set_target_properties(substrait_proto PROPERTIES PUBLIC_HEADER "${PROTO_HDRS}") # Include the protobuf library as a dependency to use this class. target_link_libraries(substrait_proto protobuf::libprotobuf) @@ -96,4 +99,4 @@ install( TARGETS substrait_proto EXPORT SubstraitTargets LIBRARY - PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/substrait/proto") + FILE_SET HEADERS DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/substrait/proto")