Skip to content

Commit

Permalink
feat: add bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
okwasniewski committed Oct 8, 2024
1 parent edda5bf commit fa93ece
Show file tree
Hide file tree
Showing 4 changed files with 805 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ DerivedData
*.xcuserstate
project.xcworkspace
cpp/basisu
example/ios/.xcode.env
example/ios/*/content.xcworkspacedata

# Android/IJ
#
Expand All @@ -40,6 +42,7 @@ cpp/basisu
.settings
local.properties
android.iml
bazel-*

# Cocoapods
#
Expand Down
20 changes: 20 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
filegroup(
name = "srcs",
srcs = glob(["encoder/**/*.cpp", "transcoder/*.cpp", "encoder/*.cpp", "transcoder/*.h", "encoder/*.h", "encoder/3rdparty/*.h", "zstd/*"]),
visibility = ["//visibility:public"],
)

cc_library(
name = "basis_universal",
hdrs = glob(["encoder/*.h", "transcoder/*.h"]),
srcs = [":srcs"],
copts = [
"-DBASISU_SUPPORT_SSE=1",
"-msse4.1",
"-Iencoder/3rdparty"
],
defines = [
"BASISD_SUPPORT_KTX2_ZSTD"
],
linkopts = ["-lpthread"],
)
Loading

0 comments on commit fa93ece

Please sign in to comment.