mirror of
https://github.com/esphome/esphome.git
synced 2026-09-24 05:24:14 +00:00
19 lines
566 B
Python
19 lines
566 B
Python
import esphome.codegen as cg
|
|
from esphome.core import CORE
|
|
from esphome.helpers import IS_MACOS
|
|
from esphome.types import ConfigType
|
|
|
|
CODEOWNERS = ["@esphome/core"]
|
|
|
|
|
|
async def to_code(config: ConfigType) -> None:
|
|
cg.add_define("USE_MD5")
|
|
|
|
# Add OpenSSL library for host platform
|
|
if CORE.is_host:
|
|
if IS_MACOS:
|
|
# macOS needs special handling for Homebrew OpenSSL
|
|
cg.add_build_flag("-I/opt/homebrew/opt/openssl/include")
|
|
cg.add_build_flag("-L/opt/homebrew/opt/openssl/lib")
|
|
cg.add_build_flag("-lcrypto")
|