diff options
| author | saturneric <[email protected]> | 2026-10-21 20:09:27 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-10-21 20:09:27 +0200 |
| commit | c5c4a43763ef464851793e208e30576c2738d244 (patch) | |
| tree | 5f163483c56a59cac4e581796d65d92865b0b390 /src | |
| parent | fix(build): align vmime headers with OpenSSL library (diff) | |
| download | modules-c5c4a43763ef464851793e208e30576c2738d244.tar.gz modules-c5c4a43763ef464851793e208e30576c2738d244.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/m_email/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
