aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-05-10 22:44:47 -0700
committerGitHub <noreply@github.com>2018-05-10 22:44:47 -0700
commit2213c1c1f6bae29513729b7285462b24df20d687 (patch)
treecb82715bc243d336113301103cd0ddc636e1da8f
parent7377d81ca44baf2e505c927a2e25b2f0e3596fed (diff)
parent2bd7f516e5f9b47abd9cd59d77bbb87ebe1f2bef (diff)
downloadprotobuf-2213c1c1f6bae29513729b7285462b24df20d687.tar.gz
protobuf-2213c1c1f6bae29513729b7285462b24df20d687.tar.bz2
protobuf-2213c1c1f6bae29513729b7285462b24df20d687.zip
Merge pull request #4538 from Mizux/patch-2
Add .proto files to extract_includes.bat
-rw-r--r--cmake/extract_includes.bat.in12
-rwxr-xr-xupdate_file_lists.sh16
2 files changed, 20 insertions, 8 deletions
diff --git a/cmake/extract_includes.bat.in b/cmake/extract_includes.bat.in
index d9423f93..9fd9de0d 100644
--- a/cmake/extract_includes.bat.in
+++ b/cmake/extract_includes.bat.in
@@ -111,3 +111,15 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format.h" includ
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format_lite.h" include\google\protobuf\wire_format_lite.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format_lite_inl.h" include\google\protobuf\wire_format_lite_inl.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wrappers.pb.h" include\google\protobuf\wrappers.pb.h
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\any.proto" include\google\protobuf\any.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\api.proto" include\google\protobuf\api.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.proto" include\google\protobuf\compiler\plugin.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor.proto" include\google\protobuf\descriptor.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\duration.proto" include\google\protobuf\duration.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\empty.proto" include\google\protobuf\empty.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\field_mask.proto" include\google\protobuf\field_mask.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\source_context.proto" include\google\protobuf\source_context.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\struct.proto" include\google\protobuf\struct.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\timestamp.proto" include\google\protobuf\timestamp.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\type.proto" include\google\protobuf\type.proto
+copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wrappers.proto" include\google\protobuf\wrappers.proto
diff --git a/update_file_lists.sh b/update_file_lists.sh
index a064d657..646c8ce3 100755
--- a/update_file_lists.sh
+++ b/update_file_lists.sh
@@ -128,15 +128,15 @@ set_cmake_value $CMAKE_DIR/tests.cmake lite_arena_test_files $CMAKE_PREFIX $LITE
# Generate extract_includes.bat
echo "mkdir include" > $EXTRACT_INCLUDES_BAT
-for HEADER in $PUBLIC_HEADERS; do
- HEADER_DIR=$(dirname $HEADER)
- while [ ! "$HEADER_DIR" = "." ]; do
- echo $HEADER_DIR | sed "s/\\//\\\\/g"
- HEADER_DIR=$(dirname $HEADER_DIR)
+for INCLUDE in $PUBLIC_HEADERS $WKT_PROTOS; do
+ INCLUDE_DIR=$(dirname "$INCLUDE")
+ while [ ! "$INCLUDE_DIR" = "." ]; do
+ echo "mkdir include\\${INCLUDE_DIR//\//\\}"
+ INCLUDE_DIR=$(dirname "$INCLUDE_DIR")
done
-done | sort | uniq | sed "s/^/mkdir include\\\\/" >> $EXTRACT_INCLUDES_BAT
-for HEADER in $PUBLIC_HEADERS; do
- WINPATH=$(echo $HEADER | sed 's;/;\\;g')
+done | sort | uniq >> $EXTRACT_INCLUDES_BAT
+for INCLUDE in $PUBLIC_HEADERS $WKT_PROTOS; do
+ WINPATH=${INCLUDE//\//\\}
echo "copy \"\${PROTOBUF_SOURCE_WIN32_PATH}\\..\\src\\$WINPATH\" include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT
done