Commit d3f37f926e for openssl.org
commit d3f37f926e22e71e20b38a122768681929d1aa12
Author: Richard Levitte <levitte@openssl.foundation>
Date: Thu Aug 27 16:12:49 2026 +0200
cmake config test: use OPENSSL_INCLUDE_DIR for ossl_config_dummy_vars
When linking via ${OPENSSL_LIBRARIES} (the traditional FindOpenSSL
variable form), the include directories are not propagated because
no imported target is involved. Consumers following this pattern
are expected to also add ${OPENSSL_INCLUDE_DIR} to the include
path themselves.
Without this, the dummy build fails on systems where OpenSSL headers
aren't in the compiler's default search path (e.g. macOS).
Assisted-by: Pi:moonshotai/kimi-k3
Signed-off-by: Richard Levitte <levitte@openssl.foundation>
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Sat Nov 14 17:36:40 2026
Merged-from: https://github.com/openssl/openssl/pull/32442
diff --git a/test/recipes/94-test_cmake_config_data/CMakeLists.txt b/test/recipes/94-test_cmake_config_data/CMakeLists.txt
index 643f216a14..1d4bfb40c4 100644
--- a/test/recipes/94-test_cmake_config_data/CMakeLists.txt
+++ b/test/recipes/94-test_cmake_config_data/CMakeLists.txt
@@ -34,6 +34,7 @@ find_package(OpenSSL CONFIG REQUIRED
add_executable(ossl_config_dummy_vars dummy.c)
target_compile_definitions(ossl_config_dummy_vars PRIVATE DIRECT_CRYPTO_CALLS)
+target_include_directories(ossl_config_dummy_vars PRIVATE ${OPENSSL_INCLUDE_DIR})
target_link_libraries(ossl_config_dummy_vars PRIVATE ${OPENSSL_LIBRARIES})
add_executable(ossl_config_dummy_tgt dummy.c)