From 130b7260dd8025ef18fd73b8b1246b6037f99a32 Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Tue, 12 Oct 2010 10:37:26 -0700 Subject: [PATCH] Reorganizing the runtime library's public headers. The library now publishes its headers under the Build/Products directory under a ProtocolBuffers/ subdirectory. This promotes friendlier namespacing for users (avoiding classes over header names such as Message.h). --- .gitignore | 2 +- src/compiler/objc_file.cc | 2 +- .../ProtocolBuffers.xcodeproj/project.pbxproj | 60 +++++++++++-------- 3 files changed, 37 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index 73f93e1..d926b57 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ src/compiler/protoc-gen-objc .DS_Store # Xcode stuff -build/ +Build/ *.pbxuser *.perspective *.perspectivev3 diff --git a/src/compiler/objc_file.cc b/src/compiler/objc_file.cc index 0292bd1..93f6c7f 100755 --- a/src/compiler/objc_file.cc +++ b/src/compiler/objc_file.cc @@ -48,7 +48,7 @@ namespace google { namespace protobuf { namespace compiler {namespace objectivec // hacky. but this is how other generators determine if we're generating // the core ProtocolBuffers library if (file_->name() != "google/protobuf/descriptor.proto") { - printer->Print("#import \"ProtocolBuffers.h\"\n\n"); + printer->Print("#import \n\n"); } if (file_->dependency_count() > 0) { diff --git a/src/runtime/ProtocolBuffers.xcodeproj/project.pbxproj b/src/runtime/ProtocolBuffers.xcodeproj/project.pbxproj index 268b4e6..a0b401b 100644 --- a/src/runtime/ProtocolBuffers.xcodeproj/project.pbxproj +++ b/src/runtime/ProtocolBuffers.xcodeproj/project.pbxproj @@ -11,50 +11,50 @@ AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; }; C57A9FDF125275F300726D16 /* Descriptor.pb.m in Sources */ = {isa = PBXBuildFile; fileRef = C57A9FDE125275F300726D16 /* Descriptor.pb.m */; }; C57A9FE4125276A400726D16 /* UnittestCustomOptions.pb.m in Sources */ = {isa = PBXBuildFile; fileRef = C57A9FE3125276A400726D16 /* UnittestCustomOptions.pb.m */; }; - C5B03EC512516B730087887C /* ConcreteExtensionField.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EC312516B730087887C /* ConcreteExtensionField.h */; }; + C5B03EC512516B730087887C /* ConcreteExtensionField.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EC312516B730087887C /* ConcreteExtensionField.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EC612516B730087887C /* ConcreteExtensionField.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EC412516B730087887C /* ConcreteExtensionField.m */; }; - C5B03ECB12516B830087887C /* ExtendableMessage_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EC712516B830087887C /* ExtendableMessage_Builder.h */; }; + C5B03ECB12516B830087887C /* ExtendableMessage_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EC712516B830087887C /* ExtendableMessage_Builder.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03ECC12516B830087887C /* ExtendableMessage_Builder.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EC812516B830087887C /* ExtendableMessage_Builder.m */; }; - C5B03ECD12516B830087887C /* ExtendableMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EC912516B830087887C /* ExtendableMessage.h */; }; + C5B03ECD12516B830087887C /* ExtendableMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EC912516B830087887C /* ExtendableMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03ECE12516B830087887C /* ExtendableMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03ECA12516B830087887C /* ExtendableMessage.m */; }; - C5B03ED212516B8E0087887C /* ExtensionField.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03ECF12516B8E0087887C /* ExtensionField.h */; }; - C5B03ED312516B8E0087887C /* ExtensionRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03ED012516B8E0087887C /* ExtensionRegistry.h */; }; + C5B03ED212516B8E0087887C /* ExtensionField.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03ECF12516B8E0087887C /* ExtensionField.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C5B03ED312516B8E0087887C /* ExtensionRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03ED012516B8E0087887C /* ExtensionRegistry.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03ED412516B8E0087887C /* ExtensionRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03ED112516B8E0087887C /* ExtensionRegistry.m */; }; - C5B03ED812516BAC0087887C /* Field.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03ED612516BAC0087887C /* Field.h */; }; + C5B03ED812516BAC0087887C /* Field.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03ED612516BAC0087887C /* Field.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03ED912516BAC0087887C /* Field.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03ED712516BAC0087887C /* Field.m */; }; - C5B03EDC12516BBC0087887C /* MutableExtensionRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EDA12516BBC0087887C /* MutableExtensionRegistry.h */; }; + C5B03EDC12516BBC0087887C /* MutableExtensionRegistry.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EDA12516BBC0087887C /* MutableExtensionRegistry.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EDD12516BBC0087887C /* MutableExtensionRegistry.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EDB12516BBC0087887C /* MutableExtensionRegistry.m */; }; - C5B03EE012516BC50087887C /* MutableField.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EDE12516BC50087887C /* MutableField.h */; }; + C5B03EE012516BC50087887C /* MutableField.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EDE12516BC50087887C /* MutableField.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EE112516BC50087887C /* MutableField.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EDF12516BC50087887C /* MutableField.m */; }; - C5B03EE612516BD50087887C /* UnknownFieldSet_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EE212516BD50087887C /* UnknownFieldSet_Builder.h */; }; + C5B03EE612516BD50087887C /* UnknownFieldSet_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EE212516BD50087887C /* UnknownFieldSet_Builder.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EE712516BD50087887C /* UnknownFieldSet_Builder.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EE312516BD50087887C /* UnknownFieldSet_Builder.m */; }; - C5B03EE812516BD50087887C /* UnknownFieldSet.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EE412516BD50087887C /* UnknownFieldSet.h */; }; + C5B03EE812516BD50087887C /* UnknownFieldSet.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EE412516BD50087887C /* UnknownFieldSet.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EE912516BD50087887C /* UnknownFieldSet.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EE512516BD50087887C /* UnknownFieldSet.m */; }; - C5B03EEF12516BFE0087887C /* GeneratedMessage_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EEB12516BFE0087887C /* GeneratedMessage_Builder.h */; }; + C5B03EEF12516BFE0087887C /* GeneratedMessage_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EEB12516BFE0087887C /* GeneratedMessage_Builder.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EF012516BFE0087887C /* GeneratedMessage_Builder.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EEC12516BFE0087887C /* GeneratedMessage_Builder.m */; }; - C5B03EF112516BFE0087887C /* GeneratedMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EED12516BFE0087887C /* GeneratedMessage.h */; }; + C5B03EF112516BFE0087887C /* GeneratedMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EED12516BFE0087887C /* GeneratedMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EF212516BFE0087887C /* GeneratedMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EEE12516BFE0087887C /* GeneratedMessage.m */; }; - C5B03EF812516C200087887C /* CodedInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EF412516C200087887C /* CodedInputStream.h */; }; + C5B03EF812516C200087887C /* CodedInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EF412516C200087887C /* CodedInputStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EF912516C200087887C /* CodedInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EF512516C200087887C /* CodedInputStream.m */; }; - C5B03EFA12516C200087887C /* CodedOutputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EF612516C200087887C /* CodedOutputStream.h */; }; + C5B03EFA12516C200087887C /* CodedOutputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EF612516C200087887C /* CodedOutputStream.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03EFB12516C200087887C /* CodedOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EF712516C200087887C /* CodedOutputStream.m */; }; - C5B03F0012516C2D0087887C /* RingBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EFC12516C2D0087887C /* RingBuffer.h */; }; + C5B03F0012516C2D0087887C /* RingBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EFC12516C2D0087887C /* RingBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; }; C5B03F0112516C2D0087887C /* RingBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EFD12516C2D0087887C /* RingBuffer.m */; }; - C5B03F0212516C2D0087887C /* TextFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EFE12516C2D0087887C /* TextFormat.h */; }; + C5B03F0212516C2D0087887C /* TextFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03EFE12516C2D0087887C /* TextFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03F0312516C2D0087887C /* TextFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03EFF12516C2D0087887C /* TextFormat.m */; }; - C5B03F0612516C330087887C /* WireFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F0412516C330087887C /* WireFormat.h */; }; + C5B03F0612516C330087887C /* WireFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F0412516C330087887C /* WireFormat.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03F0712516C330087887C /* WireFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03F0512516C330087887C /* WireFormat.m */; }; - C5B03F0D12516C510087887C /* AbstractMessage_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F0912516C510087887C /* AbstractMessage_Builder.h */; }; + C5B03F0D12516C510087887C /* AbstractMessage_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F0912516C510087887C /* AbstractMessage_Builder.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03F0E12516C510087887C /* AbstractMessage_Builder.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03F0A12516C510087887C /* AbstractMessage_Builder.m */; }; - C5B03F0F12516C510087887C /* AbstractMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F0B12516C510087887C /* AbstractMessage.h */; }; + C5B03F0F12516C510087887C /* AbstractMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F0B12516C510087887C /* AbstractMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03F1012516C510087887C /* AbstractMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03F0C12516C510087887C /* AbstractMessage.m */; }; - C5B03F1312516C690087887C /* Message_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F1112516C690087887C /* Message_Builder.h */; }; - C5B03F1412516C690087887C /* Message.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F1212516C690087887C /* Message.h */; }; - C5B03F1A12516CA10087887C /* Utilities.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F1812516CA10087887C /* Utilities.h */; }; + C5B03F1312516C690087887C /* Message_Builder.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F1112516C690087887C /* Message_Builder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C5B03F1412516C690087887C /* Message.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F1212516C690087887C /* Message.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C5B03F1A12516CA10087887C /* Utilities.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F1812516CA10087887C /* Utilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03F1B12516CA10087887C /* Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03F1912516CA10087887C /* Utilities.m */; }; - C5B03F2212516D110087887C /* ProtocolBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F2112516D110087887C /* ProtocolBuffers.h */; }; - C5B03F2412516D1B0087887C /* Bootstrap.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F2312516D1B0087887C /* Bootstrap.h */; }; - C5B03F2612516D290087887C /* ForwardDeclarations.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F2512516D290087887C /* ForwardDeclarations.h */; }; + C5B03F2212516D110087887C /* ProtocolBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F2112516D110087887C /* ProtocolBuffers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C5B03F2412516D1B0087887C /* Bootstrap.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F2312516D1B0087887C /* Bootstrap.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C5B03F2612516D290087887C /* ForwardDeclarations.h in Headers */ = {isa = PBXBuildFile; fileRef = C5B03F2512516D290087887C /* ForwardDeclarations.h */; settings = {ATTRIBUTES = (Public, ); }; }; C5B03FC712517AAE0087887C /* SmallBlockInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03F8912517A1A0087887C /* SmallBlockInputStream.m */; }; C5B03FC912517AD90087887C /* CodedInputStreamTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03F7C12517A1A0087887C /* CodedInputStreamTests.m */; }; C5B03FCA12517AD90087887C /* CodedOuputStreamTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C5B03F7E12517A1A0087887C /* CodedOuputStreamTests.m */; }; @@ -634,9 +634,14 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ../ProtocolBuffers; + OBJROOT = Build; OTHER_LDFLAGS = "-ObjC"; PREBINDING = NO; + PRIVATE_HEADERS_FOLDER_PATH = ../ProtocolBuffers/private; + PUBLIC_HEADERS_FOLDER_PATH = ../ProtocolBuffers; SDKROOT = iphoneos4.1; + SYMROOT = Build/Products; }; name = Debug; }; @@ -647,9 +652,14 @@ GCC_C_LANGUAGE_STANDARD = c99; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ../ProtocolBuffers; + OBJROOT = Build; OTHER_LDFLAGS = "-ObjC"; PREBINDING = NO; + PRIVATE_HEADERS_FOLDER_PATH = ../ProtocolBuffers/private; + PUBLIC_HEADERS_FOLDER_PATH = ../ProtocolBuffers; SDKROOT = iphoneos4.1; + SYMROOT = Build/Products; }; name = Release; };