This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ add_executable(flutter_glfw FlutterEmbedderGLFW.cc)
7
7
############################################################
8
8
# GLFW
9
9
############################################################
10
- find_path ( GLFW_INCLUDE_PATH "glfw3.h"
11
- /usr/local/Cellar/glfw/3.3/include/GLFW/
12
- /usr/local/include/include/GLFW/
13
- /usr/include/GLFW )
14
- include_directories (${GLFW_INCLUDE_PATH} )
15
- find_library ( GLFW_LIB glfw /usr/local/Cellar/glfw/3.3/lib )
16
- target_link_libraries ( flutter_glfw ${GLFW_LIB} )
10
+ option ( GLFW_BUILD_EXAMPLES "" OFF )
11
+ option ( GLFW_BUILD_TESTS "" OFF )
12
+ option ( GLFW_BUILD_DOCS "" OFF )
13
+ option ( GLFW_INSTALL "" OFF )
14
+ add_subdirectory (${CMAKE_SOURCE_DIR} /../../../third_party/glfw glfw )
15
+ target_link_libraries ( flutter_glfw glfw )
16
+ include_directories ( ${CMAKE_SOURCE_DIR} /../../../third_party/glfw/include )
17
17
18
18
############################################################
19
19
# Flutter Engine
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style license that can be
3
3
// found in the LICENSE file.
4
4
5
- #include < embedder.h>
6
- #include < glfw3.h>
7
-
8
5
#include < cassert>
9
6
#include < chrono>
10
7
#include < iostream>
11
8
9
+ #include " GLFW/glfw3.h"
10
+ #include " embedder.h"
11
+
12
12
// This value is calculated after the window is created.
13
13
static double g_pixelRatio = 1.0 ;
14
14
static const size_t kInitialWindowWidth = 800 ;
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ if [ ! -d myapp ]; then
19
19
fi
20
20
cd myapp
21
21
cp ../../main.dart lib/main.dart
22
- flutter build bundle
22
+ flutter build bundle \
23
+ --local-engine-src-path ../../../../../ \
24
+ --local-engine=host_debug_unopt
23
25
cd -
24
26
25
27
# ################################################################
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ if [ ! -d myapp ]; then
16
16
fi
17
17
pushd myapp > /dev/null
18
18
# cp ../../main.dart lib/main.dart
19
- flutter build bundle
19
+ flutter build bundle \
20
+ --local-engine-src-path ../../../../../ \
21
+ --local-engine=host_debug_unopt
20
22
popd > /dev/null
21
23
22
24
# ################################################################
You can’t perform that action at this time.
0 commit comments