You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The commit 6898451 by @mkruskal-google in 3 months ago, add ubp, but delete public headers when installation. When people build protobuf from source with protobuf_BUILD_LIBUPB=OFF, the installed cmake directory files, won't contain INTERFACE_INCLUDE_DIRECTORIES property on targets like libprotoc, libprotobuf, which will make the downstream user compile error.
I think a patch is required that determine when protobuf_BUILD_LIBUPB is OFF, still specify INTERFACE_INCLUDE_DIRECTORIES:
foreach(_library ${_protobuf_libraries})
set_property(TARGET ${_library} # HERE
PROPERTY INTERFACE_INCLUDE_DIRECTORIES # HERE
$<BUILD_INTERFACE:${protobuf_SOURCE_DIR}/src> # HERE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) # HERE
if (UNIX AND NOT APPLE)
set_property(TARGET ${_library}
PROPERTY INSTALL_RPATH "$ORIGIN")
elseif (APPLE)
set_property(TARGET ${_library}
PROPERTY INSTALL_RPATH "@loader_path")
endif()
install(TARGETS ${_library} EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_library}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
endforeach()
commit 6898451f5e4c84e79a6f48ea6c46959960743970
Author: Mike Kruskal <mkruskal@google.com>
Date: Tue Mar 19 20:13:17 2024 -0700
Setup upb installation with cmake.
This installs a upb's static library, headers, and three protoc plugin binaries (upb, upbdefs, upb_minitable). These will now be enabled by default, but can be disabled by setting protobuf_BUILD_LIBUPB=OFF.
To qualify this, we hook into our existing install test infrastructure which attempts to build and run our tests without any of the installation artifacts available from the source tree. Public headers are deleted, and builds of exported libraries/binaries are disabled.
PiperOrigin-RevId: 617376961
The text was updated successfully, but these errors were encountered:
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.
The commit 6898451 by @mkruskal-google in 3 months ago, add ubp, but delete public headers when installation. When people build protobuf from source with
protobuf_BUILD_LIBUPB=OFF
, the installedcmake
directory files, won't containINTERFACE_INCLUDE_DIRECTORIES
property on targets likelibprotoc
,libprotobuf
, which will make the downstream user compile error.I think a patch is required that determine when
protobuf_BUILD_LIBUPB
isOFF
, still specify INTERFACE_INCLUDE_DIRECTORIES:The text was updated successfully, but these errors were encountered: