From c5c4a43763ef464851793e208e30576c2738d244 Mon Sep 17 00:00:00 2001 From: saturneric Date: Wed, 21 Oct 2026 20:09:27 +0200 Subject: fix(build): prioritize selected OpenSSL headers - prevent imported OpenSSL targets from being marked as SYSTEM - ensure matching headers are searched before Homebrew's OpenSSL headers --- src/m_email/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/m_email/CMakeLists.txt b/src/m_email/CMakeLists.txt index 508930e..e94bf77 100644 --- a/src/m_email/CMakeLists.txt +++ b/src/m_email/CMakeLists.txt @@ -52,7 +52,10 @@ find_package(OpenSSL REQUIRED) # 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. +# being linked. The imported targets must stop being SYSTEM for that: CMake +# would otherwise fold this entry into their -isystem flag, and every -I +# directory is searched before any -isystem one, whatever the order. +set_property(TARGET OpenSSL::SSL OpenSSL::Crypto PROPERTY SYSTEM OFF) include_directories(BEFORE ${OPENSSL_INCLUDE_DIR}) add_subdirectory(vmime "vmime" EXCLUDE_FROM_ALL) -- cgit