-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add abseil-cpp as a dependency since it is now required. Furthermore: - add Config.cmake.in file[1] because it is missing from the tarball; - add a proposed patch[2] to fix the build with cmake. [1] protobuf-c/protobuf-c#698 [2] protobuf-c/protobuf-c#699
- Loading branch information
1 parent
16c761b
commit db4eb9d
Showing
3 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
gvsbuild/patches/protobuf-c/0001-CMakeList.txt-Remove-double-dashes.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,65 @@ | ||
From fbef2d9fbe3e93aebb286bf1366baa2ddc10a4b5 Mon Sep 17 00:00:00 2001 | ||
From: Alessandro Bono <[email protected]> | ||
Date: Fri, 15 Dec 2023 19:04:16 +0100 | ||
Subject: [PATCH] CMakeList.txt: Remove double dashes | ||
|
||
Otherwise cmake won't reconize the command. | ||
|
||
With double dashes: | ||
``` | ||
$ cmake -E env TESTENV=value -- env | grep TESTENV | ||
cmake -E env: unknown option '--' | ||
``` | ||
|
||
Without double dashes: | ||
``` | ||
$ cmake -E env TESTENV=value env | grep TESTENV | ||
TESTENV=value | ||
``` | ||
--- | ||
build-cmake/CMakeLists.txt | 8 ++++---- | ||
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt | ||
index f46fba7..c7db9f2 100644 | ||
--- a/build-cmake/CMakeLists.txt | ||
+++ b/build-cmake/CMakeLists.txt | ||
@@ -147,7 +147,7 @@ SET(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
SET(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
add_custom_target(protoc-generated-files | ||
- COMMAND ${CMAKE_COMMAND} -E env PATH="${OS_PATH_VARIABLE}" -- ${PROTOBUF_PROTOC_EXECUTABLE} | ||
+ COMMAND ${CMAKE_COMMAND} -E env PATH="${OS_PATH_VARIABLE}" ${PROTOBUF_PROTOC_EXECUTABLE} | ||
--cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I${PROTOBUF_INCLUDE_DIR} | ||
-I${MAIN_DIR} ${MAIN_DIR}/protobuf-c/protobuf-c.proto | ||
COMMENT Running protoc on ${MAIN_DIR}/protobuf-c/protobuf-c.proto | ||
@@ -186,7 +186,7 @@ ENDIF (MSVC AND BUILD_SHARED_LIBS) | ||
FUNCTION(GENERATE_TEST_SOURCES PROTO_FILE SRC HDR) | ||
ADD_CUSTOM_COMMAND(OUTPUT ${SRC} ${HDR} | ||
COMMAND ${CMAKE_COMMAND} | ||
- ARGS -E env PATH="${OS_PATH_VARIABLE}" -- ${PROTOBUF_PROTOC_EXECUTABLE} | ||
+ ARGS -E env PATH="${OS_PATH_VARIABLE}" ${PROTOBUF_PROTOC_EXECUTABLE} | ||
--plugin=$<TARGET_FILE_NAME:protoc-gen-c> -I${MAIN_DIR} ${PROTO_FILE} --c_out=${CMAKE_CURRENT_BINARY_DIR} | ||
DEPENDS protoc-gen-c) | ||
ENDFUNCTION() | ||
@@ -201,7 +201,7 @@ TARGET_LINK_LIBRARIES(test-generated-code protobuf-c) | ||
|
||
ADD_CUSTOM_COMMAND(OUTPUT t/test-full.pb.cc t/test-full.pb.h | ||
COMMAND ${CMAKE_COMMAND} | ||
- ARGS -E env PATH="${OS_PATH_VARIABLE}" -- ${PROTOBUF_PROTOC_EXECUTABLE} | ||
+ ARGS -E env PATH="${OS_PATH_VARIABLE}" ${PROTOBUF_PROTOC_EXECUTABLE} | ||
--cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I${MAIN_DIR} ${TEST_DIR}/test-full.proto | ||
) | ||
|
||
@@ -220,7 +220,7 @@ ENDIF (MSVC AND BUILD_SHARED_LIBS) | ||
FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/t/generated-code2) | ||
ADD_CUSTOM_COMMAND(OUTPUT t/generated-code2/test-full-cxx-output.inc | ||
COMMAND ${CMAKE_COMMAND} | ||
- ARGS -E env PATH="${OS_PATH_VARIABLE}" -- cxx-generate-packed-data | ||
+ ARGS -E env PATH="${OS_PATH_VARIABLE}" cxx-generate-packed-data | ||
">t/generated-code2/test-full-cxx-output.inc" | ||
DEPENDS cxx-generate-packed-data | ||
) | ||
-- | ||
2.34.1 | ||
|
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,2 @@ | ||
@PACKAGE_INIT@ | ||
include("${CMAKE_CURRENT_LIST_DIR}/protobuf-c-targets.cmake") |
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