aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/m_email/CMakeLists.txt5
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)