-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4010620
commit db0a762
Showing
14 changed files
with
202 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
|
||
exports_files( | ||
[ | ||
"BUILD.libjpeg_turbo.bazel", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
build_test( | ||
name = "libjpeg_turbo_build_test", | ||
targets = [ | ||
"@libjpeg_turbo//:libjpeg_turbo", | ||
], | ||
visibility = ["//:__pkg__"], | ||
) |
27 changes: 27 additions & 0 deletions
27
examples/third_party/libjpeg_turbo/BUILD.libjpeg_turbo.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") | ||
|
||
filegroup( | ||
name = "all_files", | ||
srcs = glob(["**"]), | ||
) | ||
|
||
cmake( | ||
name = "libjpeg_turbo", | ||
cache_entries = { | ||
"CMAKE_BUILD_TYPE": "Release", | ||
"WITH_JAVA": "0", | ||
}, | ||
lib_source = ":all_files", | ||
out_shared_libs = select({ | ||
"@platforms//os:linux": [ | ||
"libjpeg.so", | ||
], | ||
"@platforms//os:macos": [ | ||
"libturbojpeg.dylib", | ||
], | ||
"@platforms//os:windows": [ | ||
"libjpeg.dll", | ||
], | ||
}), | ||
visibility = ["//visibility:public"], | ||
) |
14 changes: 14 additions & 0 deletions
14
examples/third_party/libjpeg_turbo/libjpeg_turbo_repositories.bzl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""A module defining the third party dependency libjpeg_turbo""" | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
||
def libjpeg_turbo_repositories(): | ||
maybe( | ||
http_archive, | ||
name = "libjpeg_turbo", | ||
sha256 = "6a965adb02ad898b2ae48214244618fe342baea79db97157fdc70d8844ac6f09", | ||
strip_prefix = "libjpeg-turbo-2.0.90", | ||
url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/2.0.90.tar.gz", | ||
build_file = Label("//libjpeg_turbo:BUILD.libjpeg_turbo.bazel"), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.