-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[protobuf] Add option to build tools
Avoid adding to env if cross building. Add patch that fixes android build (already fixed upstream) Add patch fixes ios build (upstream patch necessary)
- Loading branch information
1 parent
beffbf8
commit 08297d7
Showing
5 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/cmake/install.cmake | ||
+++ b/cmake/install.cmake | ||
@@ -30,7 +30,7 @@ endforeach() | ||
|
||
if (protobuf_BUILD_PROTOC_BINARIES) | ||
install(TARGETS protoc EXPORT protobuf-targets | ||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) | ||
if (UNIX AND NOT APPLE) | ||
set_property(TARGET protoc | ||
PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") |
25 changes: 25 additions & 0 deletions
25
recipes/protobuf/all/patches/upstream-pr-7288-android-log.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- a/cmake/libprotobuf.cmake | ||
+++ b/cmake/libprotobuf.cmake | ||
@@ -121,6 +121,9 @@ endif() | ||
if(protobuf_LINK_LIBATOMIC) | ||
target_link_libraries(libprotobuf atomic) | ||
endif() | ||
+if(${CMAKE_SYSTEM_NAME} STREQUAL "Android") | ||
+ target_link_libraries(libprotobuf log) | ||
+endif() | ||
target_include_directories(libprotobuf PUBLIC ${protobuf_source_dir}/src) | ||
if(MSVC AND protobuf_BUILD_SHARED_LIBS) | ||
target_compile_definitions(libprotobuf | ||
|
||
--- a/cmake/libprotobuf-lite.cmake | ||
+++ b/cmake/libprotobuf-lite.cmake | ||
@@ -67,6 +67,9 @@ target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT}) | ||
if(protobuf_LINK_LIBATOMIC) | ||
target_link_libraries(libprotobuf-lite atomic) | ||
endif() | ||
+if(${CMAKE_SYSTEM_NAME} STREQUAL "Android") | ||
+ target_link_libraries(libprotobuf-lite log) | ||
+endif() | ||
target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src) | ||
if(MSVC AND protobuf_BUILD_SHARED_LIBS) | ||
target_compile_definitions(libprotobuf-lite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters