update build.dart to set ENABLE_TRACING based on tracing property from user defines
This commit is contained in:
@@ -88,16 +88,14 @@ void main(List<String> args) async {
|
|||||||
"backend",
|
"backend",
|
||||||
"filameshio",
|
"filameshio",
|
||||||
"viewer",
|
"viewer",
|
||||||
if(targetOS != OS.iOS)
|
if (targetOS != OS.iOS) "filamat",
|
||||||
"filamat",
|
|
||||||
"meshoptimizer",
|
"meshoptimizer",
|
||||||
"mikktspace",
|
"mikktspace",
|
||||||
"geometry",
|
"geometry",
|
||||||
"utils",
|
"utils",
|
||||||
"filabridge",
|
"filabridge",
|
||||||
"gltfio_core",
|
"gltfio_core",
|
||||||
if(targetOS != OS.android && targetOS != OS.iOS)
|
if (targetOS != OS.android && targetOS != OS.iOS) "gltfio",
|
||||||
"gltfio",
|
|
||||||
"filament-iblprefilter",
|
"filament-iblprefilter",
|
||||||
"image",
|
"image",
|
||||||
"imageio",
|
"imageio",
|
||||||
@@ -129,9 +127,11 @@ void main(List<String> args) async {
|
|||||||
|
|
||||||
final defines = <String, String?>{
|
final defines = <String, String?>{
|
||||||
// uncomment this to enable (very verbose) trace logging
|
// uncomment this to enable (very verbose) trace logging
|
||||||
// "ENABLE_TRACING": "1"
|
"ENABLE_TRACING": input.userDefines["tracing"] == null ? "0" : "1"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var frameworks = [];
|
var frameworks = [];
|
||||||
if (platform != "windows") {
|
if (platform != "windows") {
|
||||||
flags.addAll(['-std=c++17']);
|
flags.addAll(['-std=c++17']);
|
||||||
@@ -200,8 +200,8 @@ void main(List<String> args) async {
|
|||||||
: ['native/include', 'native/include/filament'],
|
: ['native/include', 'native/include/filament'],
|
||||||
defines: platform == "windows" ? {} : defines,
|
defines: platform == "windows" ? {} : defines,
|
||||||
flags: [
|
flags: [
|
||||||
if (platform == "macos") '-mmacosx-version-min=13.0',
|
if (targetOS == OS.macOS) ...['-mmacosx-version-min=13.0'],
|
||||||
if (platform == "ios") '-mios-version-min=13.0',
|
if (targetOS == OS.iOS) '-mios-version-min=13.0',
|
||||||
...flags,
|
...flags,
|
||||||
...frameworks,
|
...frameworks,
|
||||||
if (platform != "windows") ...[
|
if (platform != "windows") ...[
|
||||||
@@ -258,11 +258,11 @@ void main(List<String> args) async {
|
|||||||
"libc++_shared.so"
|
"libc++_shared.so"
|
||||||
].join(Platform.pathSeparator));
|
].join(Platform.pathSeparator));
|
||||||
final libcpp = CodeAsset(
|
final libcpp = CodeAsset(
|
||||||
package: "thermion_dart",
|
package: "thermion_dart",
|
||||||
name: "libc++_shared.so",
|
name: "libc++_shared.so",
|
||||||
linkMode: DynamicLoadingBundled(),
|
linkMode: DynamicLoadingBundled(),
|
||||||
file: stlPath.uri,
|
file: stlPath.uri,
|
||||||
);
|
);
|
||||||
|
|
||||||
output.assets.addEncodedAsset(libcpp.encode());
|
output.assets.addEncodedAsset(libcpp.encode());
|
||||||
}
|
}
|
||||||
@@ -273,11 +273,11 @@ void main(List<String> args) async {
|
|||||||
outputDirectory.path.substring(1).replaceAll("/", "\\"),
|
outputDirectory.path.substring(1).replaceAll("/", "\\"),
|
||||||
"thermion_dart.lib"));
|
"thermion_dart.lib"));
|
||||||
final libthermion = CodeAsset(
|
final libthermion = CodeAsset(
|
||||||
package: packageName,
|
package: packageName,
|
||||||
name: "thermion_dart.lib",
|
name: "thermion_dart.lib",
|
||||||
linkMode: DynamicLoadingBundled(),
|
linkMode: DynamicLoadingBundled(),
|
||||||
file: importLib.uri,
|
file: importLib.uri,
|
||||||
);
|
);
|
||||||
output.assets.addEncodedAsset(libthermion.encode());
|
output.assets.addEncodedAsset(libthermion.encode());
|
||||||
|
|
||||||
for (final dir in ["windows/vulkan"]) {
|
for (final dir in ["windows/vulkan"]) {
|
||||||
@@ -296,11 +296,11 @@ void main(List<String> args) async {
|
|||||||
path.join(targetSubdir, path.basename(file.path));
|
path.join(targetSubdir, path.basename(file.path));
|
||||||
file.copySync(targetPath);
|
file.copySync(targetPath);
|
||||||
final include = CodeAsset(
|
final include = CodeAsset(
|
||||||
package: packageName,
|
package: packageName,
|
||||||
name: "include/$dir/${path.basename(file.path)}",
|
name: "include/$dir/${path.basename(file.path)}",
|
||||||
linkMode: DynamicLoadingBundled(),
|
linkMode: DynamicLoadingBundled(),
|
||||||
file: file.uri,
|
file: file.uri,
|
||||||
);
|
);
|
||||||
output.assets.addEncodedAsset(include.encode());
|
output.assets.addEncodedAsset(include.encode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user