From bf082221ff55be706e162f1a15e9df3247ef7e7b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:37:09 +0100 Subject: [PATCH] cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` This change effectively adds `-DSECP256K1_STATIC` to usage requirements of `secp256k1_objs` on Windows, preventing LNK4217 linker warnings. --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f1d2ee3ba..7ec6045c41 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -86,7 +86,8 @@ target_include_directories(secp256k1 INTERFACE $>:${PROJECT_SOURCE_DIR}/include>> ) set_target_properties(secp256k1_objs PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "$" + INTERFACE_COMPILE_DEFINITIONS "$" + INTERFACE_INCLUDE_DIRECTORIES "$" ) # This emulates Libtool to make sure Libtool and CMake agree on the ABI version,