Skip to content

Commit 58d0e92

Browse files
authored
Use project-relative paths in plugins (#139)
Updates all plugin code other than public library headers to follow standard Google style of using project-relative include paths. This makes plugins consistent with the rest of the Linux code, which was fixed in an earlier change.
1 parent 28d7b4a commit 58d0e92

File tree

15 files changed

+28
-22
lines changed

15 files changed

+28
-22
lines changed

plugins/color_panel/common/channel_constants.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
#include "channel_constants.h"
14+
#include "plugins/color_panel/common/channel_constants.h"
1515

1616
namespace plugins_color_panel {
1717

plugins/color_panel/linux/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
# limitations under the License.
1414
LIBRARY_OUT=libflutter_embedder_color_panel.so
1515

16+
PROJECT_ROOT=$(CURDIR)/../../..
1617
# For dependency on the embedder shared library.
17-
EMBEDDER_LIBRARY_DIR=$(CURDIR)/../../../library/linux
18+
EMBEDDER_LIBRARY_DIR=$(PROJECT_ROOT)/library/linux
1819
EMBEDDER_LIB_NAME=flutter_engine
1920
EMBEDDER_LIB_FILE=$(EMBEDDER_LIBRARY_DIR)/lib$(EMBEDDER_LIB_NAME).so
2021

2122
COMMON_DIR=$(CURDIR)/../common
2223

2324
CXX=g++ -std=c++14
2425
CXXFLAGS= -Wall -Werror -shared -fPIC \
25-
-I$(CURDIR)/include \
26-
-I$(COMMON_DIR) \
26+
-I$(PROJECT_ROOT) \
2727
-I$(EMBEDDER_LIBRARY_DIR)/include \
2828
$(shell pkg-config --cflags gtk+-3.0 jsoncpp)
2929
LDFLAGS= -L$(EMBEDDER_LIBRARY_DIR) \

plugins/color_panel/linux/src/color_panel_plugin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
#include <color_panel/color_panel_plugin.h>
14+
#include "plugins/color_panel/linux/include/color_panel/color_panel_plugin.h"
1515

1616
#include <gtk/gtk.h>
1717
#include <iostream>
1818

19-
#include "../common/channel_constants.h"
19+
#include "plugins/color_panel/common/channel_constants.h"
2020

2121
static constexpr char kWindowTitle[] = "Flutter Color Picker";
2222

plugins/color_panel/macos/FLEColorPanelPlugin.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#import <AppKit/AppKit.h>
1818

19-
#include "../common/channel_constants.h"
19+
#include "plugins/color_panel/common/channel_constants.h"
2020

2121
@implementation FLEColorPanelPlugin
2222

plugins/color_panel/macos/FlutterEmbedderColorPanel.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@
343343
DYLIB_CURRENT_VERSION = 1;
344344
DYLIB_INSTALL_NAME_BASE = "@rpath";
345345
FRAMEWORK_VERSION = A;
346+
HEADER_SEARCH_PATHS = ../../..;
346347
INFOPLIST_FILE = Info.plist;
347348
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
348349
LD_RUNPATH_SEARCH_PATHS = (
@@ -367,6 +368,7 @@
367368
DYLIB_CURRENT_VERSION = 1;
368369
DYLIB_INSTALL_NAME_BASE = "@rpath";
369370
FRAMEWORK_VERSION = A;
371+
HEADER_SEARCH_PATHS = ../../..;
370372
INFOPLIST_FILE = Info.plist;
371373
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
372374
LD_RUNPATH_SEARCH_PATHS = (

plugins/file_chooser/common/channel_constants.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
#include "channel_constants.h"
14+
#include "plugins/file_chooser/common/channel_constants.h"
1515

1616
namespace plugins_file_chooser {
1717

plugins/file_chooser/linux/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
# limitations under the License.
1414
LIBRARY_OUT=libflutter_embedder_file_chooser.so
1515

16+
PROJECT_ROOT=$(CURDIR)/../../..
1617
# For dependency on the embedder shared library.
17-
EMBEDDER_LIBRARY_DIR=$(CURDIR)/../../../library/linux
18+
EMBEDDER_LIBRARY_DIR=$(PROJECT_ROOT)/library/linux
1819
EMBEDDER_LIB_NAME=flutter_engine
1920
EMBEDDER_LIB_FILE=$(EMBEDDER_LIBRARY_DIR)/lib$(EMBEDDER_LIB_NAME).so
2021

2122
COMMON_DIR=$(CURDIR)/../common
2223

2324
CXX=g++ -std=c++14
2425
CXXFLAGS= -Wall -Werror -shared -fPIC \
25-
-I$(CURDIR)/include \
26-
-I$(COMMON_DIR) \
26+
-I$(PROJECT_ROOT) \
2727
-I$(EMBEDDER_LIBRARY_DIR)/include \
2828
$(shell pkg-config --cflags gtk+-3.0 jsoncpp)
2929
LDFLAGS= -L$(EMBEDDER_LIBRARY_DIR) \

plugins/file_chooser/linux/src/file_chooser_plugin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
#include <file_chooser/file_chooser_plugin.h>
14+
#include "plugins/file_chooser/linux/include/file_chooser/file_chooser_plugin.h"
1515

1616
#include <gtk/gtk.h>
1717
#include <iostream>
1818
#include <vector>
1919

20-
#include "../common/channel_constants.h"
20+
#include "plugins/file_chooser/common/channel_constants.h"
2121

2222
// File chooser callback results.
2323
static constexpr int kCancelResultValue = 0;

plugins/file_chooser/macos/FLEFileChooserPlugin.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#import <AppKit/AppKit.h>
1818

19-
#include "../common/channel_constants.h"
19+
#include "plugins/file_chooser/common/channel_constants.h"
2020

2121
@implementation FLEFileChooserPlugin
2222

plugins/file_chooser/macos/FlutterEmbedderFileChooser.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@
345345
DYLIB_CURRENT_VERSION = 1;
346346
DYLIB_INSTALL_NAME_BASE = "@rpath";
347347
FRAMEWORK_VERSION = A;
348+
HEADER_SEARCH_PATHS = ../../..;
348349
INFOPLIST_FILE = Info.plist;
349350
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
350351
LD_RUNPATH_SEARCH_PATHS = (
@@ -369,6 +370,7 @@
369370
DYLIB_CURRENT_VERSION = 1;
370371
DYLIB_INSTALL_NAME_BASE = "@rpath";
371372
FRAMEWORK_VERSION = A;
373+
HEADER_SEARCH_PATHS = ../../..;
372374
INFOPLIST_FILE = Info.plist;
373375
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
374376
LD_RUNPATH_SEARCH_PATHS = (

plugins/menubar/common/channel_constants.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
#include "channel_constants.h"
14+
#include "plugins/menubar/common/channel_constants.h"
1515

1616
namespace plugins_menubar {
1717

plugins/menubar/linux/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
# limitations under the License.
1414
LIBRARY_OUT=libflutter_embedder_menubar.so
1515

16+
PROJECT_ROOT=$(CURDIR)/../../..
1617
# For dependency on the embedder shared library.
17-
EMBEDDER_LIBRARY_DIR=$(CURDIR)/../../../library/linux
18+
EMBEDDER_LIBRARY_DIR=$(PROJECT_ROOT)/library/linux
1819
EMBEDDER_LIB_NAME=flutter_engine
1920
EMBEDDER_LIB_FILE=$(EMBEDDER_LIBRARY_DIR)/lib$(EMBEDDER_LIB_NAME).so
2021

2122
COMMON_DIR=$(CURDIR)/../common
2223

2324
CXX=g++ -std=c++14
2425
CXXFLAGS= -Wall -Werror -shared -fPIC \
25-
-I$(CURDIR)/include \
26-
-I$(COMMON_DIR) \
26+
-I$(PROJECT_ROOT) \
2727
-I$(EMBEDDER_LIBRARY_DIR)/include \
2828
$(shell pkg-config --cflags gtk+-3.0 jsoncpp)
2929
LDFLAGS= -L$(EMBEDDER_LIBRARY_DIR) \

plugins/menubar/linux/src/menubar_plugin.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <menubar/menubar_plugin.h>
15+
#include "plugins/menubar/linux/include/menubar/menubar_plugin.h"
1616

1717
#include <gtk/gtk.h>
1818
#include <stdio.h>
1919

20-
#include "../../common/channel_constants.h"
20+
#include "plugins/menubar/common/channel_constants.h"
2121

2222
static constexpr char kWindowTitle[] = "Flutter Menubar";
2323

@@ -157,4 +157,4 @@ void MenubarPlugin::HandleJsonMethodCall(const JsonMethodCall &method_call,
157157
}
158158
}
159159

160-
} // namespace plugins_menubar
160+
} // namespace plugins_menubar

plugins/menubar/macos/FLEMenubarPlugin.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#import "FLEMenubarPlugin.h"
1616

17-
#include "../common/channel_constants.h"
17+
#include "plugins/menubar/common/channel_constants.h"
1818

1919
@implementation FLEMenubarPlugin
2020

plugins/menubar/macos/FlutterEmbedderMenubar.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@
345345
DYLIB_CURRENT_VERSION = 1;
346346
DYLIB_INSTALL_NAME_BASE = "@rpath";
347347
FRAMEWORK_VERSION = A;
348+
HEADER_SEARCH_PATHS = ../../..;
348349
INFOPLIST_FILE = Info.plist;
349350
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
350351
LD_RUNPATH_SEARCH_PATHS = (
@@ -369,6 +370,7 @@
369370
DYLIB_CURRENT_VERSION = 1;
370371
DYLIB_INSTALL_NAME_BASE = "@rpath";
371372
FRAMEWORK_VERSION = A;
373+
HEADER_SEARCH_PATHS = ../../..;
372374
INFOPLIST_FILE = Info.plist;
373375
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
374376
LD_RUNPATH_SEARCH_PATHS = (

0 commit comments

Comments
 (0)