Skip to content

Commit

Permalink
Fix Bazel build
Browse files Browse the repository at this point in the history
  • Loading branch information
eustas committed Dec 27, 2024
1 parent a35bf04 commit 1aa50c5
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 1,215 deletions.
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"""JPEG XL reference implementation"""

module(
name = "libjxl",
repo_name = "libjxl",
name = "jpegli",
repo_name = "jpegli",
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
Expand Down
5 changes: 3 additions & 2 deletions lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ load(
"libjxl_deps_skcms",
# "libjxl_deps_testdata",
# "libjxl_deps_webp",
"libjxl_root_package",
"jpegli_root_package",
"libjxl_test_shards",
"libjxl_test_timeouts",
)
Expand Down Expand Up @@ -228,7 +228,7 @@ cc_library(
hdrs = [path for path in TESTLIB_FILES if path.endswith(".h")],
compatible_with = DEFAULT_COMPATIBILITY,
defines = [
'JPEGXL_ROOT_PACKAGE=\'"' + libjxl_root_package + '"\'',
'JPEGLI_ROOT_PACKAGE=\'"' + jpegli_root_package + '"\'',
],
deps = [
":jpegli",
Expand All @@ -244,6 +244,7 @@ TESTS = [path.partition(".")[0] for path in libjxl_tests + libjxl_jpegli_tests]
timeout = libjxl_test_timeouts.get(test, "moderate"),
srcs = [
test + ".cc",
"base/testing.h",
"jpegli/testing.h",
],
data = ["//:testdata"],
Expand Down
2 changes: 1 addition & 1 deletion lib/extras/test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ std::string GetTestDataPath(const std::string& filename) {
using bazel::tools::cpp::runfiles::Runfiles;
const std::unique_ptr<Runfiles> kRunfiles(Runfiles::Create(""));
std::string GetTestDataPath(const std::string& filename) {
std::string root(JPEGXL_ROOT_PACKAGE "/testdata/");
std::string root(JPEGLI_ROOT_PACKAGE "/testdata/");
return kRunfiles->Rlocation(root + filename);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion lib/jpegli/test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ std::string GetTestDataPath(const std::string& filename) {
using ::bazel::tools::cpp::runfiles::Runfiles;
const std::unique_ptr<Runfiles> kRunfiles(Runfiles::Create(""));
std::string GetTestDataPath(const std::string& filename) {
std::string root(JPEGXL_ROOT_PACKAGE "/testdata/");
std::string root(JPEGLI_ROOT_PACKAGE "/testdata/");
return kRunfiles->Rlocation(root + filename);
}
#endif
Expand Down
5 changes: 3 additions & 2 deletions lib/jxl_extras.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ include(jxl_lists.cmake)
list(APPEND JPEGXL_EXTRAS_CORE_SOURCES
"${JPEGXL_INTERNAL_EXTRAS_SOURCES}"
"${JPEGXL_INTERNAL_CODEC_APNG_SOURCES}"
../third_party/apngdis/dec.cc
../third_party/apngdis/enc.cc
"${JPEGXL_INTERNAL_CODEC_EXR_SOURCES}"
"${JPEGXL_INTERNAL_CODEC_GIF_SOURCES}"
"${JPEGXL_INTERNAL_CODEC_JPG_SOURCES}"
"${JPEGXL_INTERNAL_CODEC_PGX_SOURCES}"
"${JPEGXL_INTERNAL_CODEC_PNM_SOURCES}"
"${JPEGXL_INTERNAL_CODEC_NPY_SOURCES}"
extras/dec/gif.cc
extras/dec/gif.h
)
foreach(LIB jxl_extras_core-obj jxl_extras_core_nocodec-obj)
add_library("${LIB}" OBJECT "${JPEGXL_EXTRAS_CORE_SOURCES}")
Expand Down
Loading

0 comments on commit 1aa50c5

Please sign in to comment.