31 lines
1.1 KiB
Python
31 lines
1.1 KiB
Python
# (c) 2025 by Stephan Menzel
|
|
# Licensed under the Apache License, Version 2.0.
|
|
# See attached file LICENSE for full details
|
|
|
|
from pathlib import Path
|
|
|
|
from build_functions.build_utils import print_banner
|
|
from common.azure import write_package_version_batch
|
|
from common.cmake import cmake_build_install
|
|
from common.git_helpers import clone_git_tag
|
|
from package.package_info import get_package_info
|
|
|
|
|
|
def build_libzmq(prefix: Path | str, sbom: dict):
|
|
print_banner("Building Lib ZeroMQ")
|
|
|
|
package_info = get_package_info("libzmq")
|
|
package_info.add_to_sbom(sbom)
|
|
|
|
libzmq_cmake_args = [
|
|
("BUILD_SHARED:BOOL", "OFF"), # yes, they seem to have their own
|
|
("BUILD_TESTS:BOOL", "OFF"), # yes, they seem to have their own
|
|
("ZMQ_BUILD_TESTS:BOOL", "OFF"), # correction! It would appear as if they have _two_
|
|
("WITH_PERF_TOOL:BOOL", "OFF")
|
|
]
|
|
libzmq_dir = clone_git_tag(package_info, recursive=True)
|
|
install_dir = cmake_build_install(libzmq_dir, package_info, cmake_args=libzmq_cmake_args)
|
|
write_package_version_batch(package_info.version)
|
|
return install_dir
|
|
|