aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-10-21 07:04:41 +0200
committersaturneric <[email protected]>2026-10-21 07:04:41 +0200
commit641593a65ab87739365c21617444513c8b7ce759 (patch)
tree481759fae684ecee41b170859bf51e3494a84635 /src
parentchore(email): update vmime submodule (diff)
downloadmodules-641593a65ab87739365c21617444513c8b7ce759.tar.gz
modules-641593a65ab87739365c21617444513c8b7ce759.zip
fix(build): align vmime headers with OpenSSL library
- prioritize the discovered OpenSSL include directory for vmime - prevent mismatches with Homebrew's unversioned OpenSSL headers - ensure the module and its tests use headers matching the linked library
Diffstat (limited to 'src')
-rw-r--r--src/m_email/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/m_email/CMakeLists.txt b/src/m_email/CMakeLists.txt
index a145222..508930e 100644
--- a/src/m_email/CMakeLists.txt
+++ b/src/m_email/CMakeLists.txt
@@ -48,6 +48,13 @@ set(VMIME_HAVE_MESSAGING_PROTO_SENDMAIL OFF CACHE BOOL
"No Sendmail protocol" FORCE)
find_package(OpenSSL REQUIRED)
+# The top-level CMakeLists puts /opt/homebrew/include on every target, and that
+# holds the headers of Homebrew's unversioned openssl formula (4.x), not the
+# keg-only openssl@3 that OPENSSL_ROOT_DIR selects. Search the found headers
+# first, for vmime, this module and its tests alike, so they match the library
+# being linked.
+include_directories(BEFORE ${OPENSSL_INCLUDE_DIR})
+
add_subdirectory(vmime "vmime" EXCLUDE_FROM_ALL)
# vmime wraps every TARGET_LINK_LIBRARIES for its TLS backend in