Skip to content

Use project-relative paths in plugins #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/color_panel/common/channel_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "channel_constants.h"
#include "plugins/color_panel/common/channel_constants.h"

namespace plugins_color_panel {

Expand Down
6 changes: 3 additions & 3 deletions plugins/color_panel/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
# limitations under the License.
LIBRARY_OUT=libflutter_embedder_color_panel.so

PROJECT_ROOT=$(CURDIR)/../../..
# For dependency on the embedder shared library.
EMBEDDER_LIBRARY_DIR=$(CURDIR)/../../../library/linux
EMBEDDER_LIBRARY_DIR=$(PROJECT_ROOT)/library/linux
EMBEDDER_LIB_NAME=flutter_engine
EMBEDDER_LIB_FILE=$(EMBEDDER_LIBRARY_DIR)/lib$(EMBEDDER_LIB_NAME).so

COMMON_DIR=$(CURDIR)/../common

CXX=g++ -std=c++14
CXXFLAGS= -Wall -Werror -shared -fPIC \
-I$(CURDIR)/include \
-I$(COMMON_DIR) \
-I$(PROJECT_ROOT) \
-I$(EMBEDDER_LIBRARY_DIR)/include \
$(shell pkg-config --cflags gtk+-3.0 jsoncpp)
LDFLAGS= -L$(EMBEDDER_LIBRARY_DIR) \
Expand Down
4 changes: 2 additions & 2 deletions plugins/color_panel/linux/src/color_panel_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <color_panel/color_panel_plugin.h>
#include "plugins/color_panel/linux/include/color_panel/color_panel_plugin.h"

#include <gtk/gtk.h>
#include <iostream>

#include "../common/channel_constants.h"
#include "plugins/color_panel/common/channel_constants.h"

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

Expand Down
2 changes: 1 addition & 1 deletion plugins/color_panel/macos/FLEColorPanelPlugin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import <AppKit/AppKit.h>

#include "../common/channel_constants.h"
#include "plugins/color_panel/common/channel_constants.h"

@implementation FLEColorPanelPlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = ../../..;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -367,6 +368,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = ../../..;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
2 changes: 1 addition & 1 deletion plugins/file_chooser/common/channel_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "channel_constants.h"
#include "plugins/file_chooser/common/channel_constants.h"

namespace plugins_file_chooser {

Expand Down
6 changes: 3 additions & 3 deletions plugins/file_chooser/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
# limitations under the License.
LIBRARY_OUT=libflutter_embedder_file_chooser.so

PROJECT_ROOT=$(CURDIR)/../../..
# For dependency on the embedder shared library.
EMBEDDER_LIBRARY_DIR=$(CURDIR)/../../../library/linux
EMBEDDER_LIBRARY_DIR=$(PROJECT_ROOT)/library/linux
EMBEDDER_LIB_NAME=flutter_engine
EMBEDDER_LIB_FILE=$(EMBEDDER_LIBRARY_DIR)/lib$(EMBEDDER_LIB_NAME).so

COMMON_DIR=$(CURDIR)/../common

CXX=g++ -std=c++14
CXXFLAGS= -Wall -Werror -shared -fPIC \
-I$(CURDIR)/include \
-I$(COMMON_DIR) \
-I$(PROJECT_ROOT) \
-I$(EMBEDDER_LIBRARY_DIR)/include \
$(shell pkg-config --cflags gtk+-3.0 jsoncpp)
LDFLAGS= -L$(EMBEDDER_LIBRARY_DIR) \
Expand Down
4 changes: 2 additions & 2 deletions plugins/file_chooser/linux/src/file_chooser_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <file_chooser/file_chooser_plugin.h>
#include "plugins/file_chooser/linux/include/file_chooser/file_chooser_plugin.h"

#include <gtk/gtk.h>
#include <iostream>
#include <vector>

#include "../common/channel_constants.h"
#include "plugins/file_chooser/common/channel_constants.h"

// File chooser callback results.
static constexpr int kCancelResultValue = 0;
Expand Down
2 changes: 1 addition & 1 deletion plugins/file_chooser/macos/FLEFileChooserPlugin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#import <AppKit/AppKit.h>

#include "../common/channel_constants.h"
#include "plugins/file_chooser/common/channel_constants.h"

@implementation FLEFileChooserPlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = ../../..;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -369,6 +370,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = ../../..;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
2 changes: 1 addition & 1 deletion plugins/menubar/common/channel_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "channel_constants.h"
#include "plugins/menubar/common/channel_constants.h"

namespace plugins_menubar {

Expand Down
6 changes: 3 additions & 3 deletions plugins/menubar/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
# limitations under the License.
LIBRARY_OUT=libflutter_embedder_menubar.so

PROJECT_ROOT=$(CURDIR)/../../..
# For dependency on the embedder shared library.
EMBEDDER_LIBRARY_DIR=$(CURDIR)/../../../library/linux
EMBEDDER_LIBRARY_DIR=$(PROJECT_ROOT)/library/linux
EMBEDDER_LIB_NAME=flutter_engine
EMBEDDER_LIB_FILE=$(EMBEDDER_LIBRARY_DIR)/lib$(EMBEDDER_LIB_NAME).so

COMMON_DIR=$(CURDIR)/../common

CXX=g++ -std=c++14
CXXFLAGS= -Wall -Werror -shared -fPIC \
-I$(CURDIR)/include \
-I$(COMMON_DIR) \
-I$(PROJECT_ROOT) \
-I$(EMBEDDER_LIBRARY_DIR)/include \
$(shell pkg-config --cflags gtk+-3.0 jsoncpp)
LDFLAGS= -L$(EMBEDDER_LIBRARY_DIR) \
Expand Down
6 changes: 3 additions & 3 deletions plugins/menubar/linux/src/menubar_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <menubar/menubar_plugin.h>
#include "plugins/menubar/linux/include/menubar/menubar_plugin.h"

#include <gtk/gtk.h>
#include <stdio.h>

#include "../../common/channel_constants.h"
#include "plugins/menubar/common/channel_constants.h"

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

Expand Down Expand Up @@ -157,4 +157,4 @@ void MenubarPlugin::HandleJsonMethodCall(const JsonMethodCall &method_call,
}
}

} // namespace plugins_menubar
} // namespace plugins_menubar
2 changes: 1 addition & 1 deletion plugins/menubar/macos/FLEMenubarPlugin.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#import "FLEMenubarPlugin.h"

#include "../common/channel_constants.h"
#include "plugins/menubar/common/channel_constants.h"

@implementation FLEMenubarPlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = ../../..;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -369,6 +370,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
HEADER_SEARCH_PATHS = ../../..;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down