Skip to content

Commit

Permalink
Add Bazel build files based on Cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
BYVoid committed Jul 13, 2024
1 parent ee29bcd commit 33c3dc9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
24 changes: 24 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
""" Builds libzmq."""

load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")

filegroup(
name = "srcs",
srcs = glob(["**"]),
)

cmake(
name = "libzmq",
env = {"CMAKE_BUILD_TYPE": "Release"},
lib_source = ":srcs",
out_include_dir = "include",
out_static_libs = ["libzmq.a"],
visibility = ["//visibility:public"],
)

cc_library(
name = "libzmq_headers_only",
hdrs = glob(["include/*.h"]),
strip_include_prefix = "include",
visibility = ["//visibility:public"],
)
13 changes: 13 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
The ZeroMQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products.
"""

module(
name = "libzmq",
version = "4.3.5",
compatibility_level = 4,
)

bazel_dep(name = "rules_foreign_cc", version = "0.10.1")

0 comments on commit 33c3dc9

Please sign in to comment.