aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-10-30 07:33:51 +0000
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2024-11-06 15:40:42 +0000
commitffda355b5a2113fa0f7db8015f7b08bf1351e245 (patch)
tree2aec32abc612213df2a7ce8e1a464bf3436d8f68 /cmake
parentb619bdc3303217f4415342fe60e586e18fa48308 (diff)
cmake, refactor: Move `HAVE_EVHTTP_...` to `libevent` interface
Diffstat (limited to 'cmake')
-rw-r--r--cmake/bitcoin-build-config.h.in3
-rw-r--r--cmake/module/FindLibevent.cmake4
2 files changed, 3 insertions, 4 deletions
diff --git a/cmake/bitcoin-build-config.h.in b/cmake/bitcoin-build-config.h.in
index dce9261da2..56e0519fac 100644
--- a/cmake/bitcoin-build-config.h.in
+++ b/cmake/bitcoin-build-config.h.in
@@ -71,9 +71,6 @@
*/
#cmakedefine01 HAVE_DECL_SETSID
-/* Define this symbol if evhttp_connection_get_peer expects const char** */
-#cmakedefine HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR 1
-
/* Define to 1 if fdatasync is available. */
#cmakedefine HAVE_FDATASYNC 1
diff --git a/cmake/module/FindLibevent.cmake b/cmake/module/FindLibevent.cmake
index 280e38adf9..c006b43d60 100644
--- a/cmake/module/FindLibevent.cmake
+++ b/cmake/module/FindLibevent.cmake
@@ -35,7 +35,9 @@ function(check_evhttp_connection_get_peer target)
" HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR
)
cmake_pop_check_state()
- set(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR ${HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR} PARENT_SCOPE)
+ target_compile_definitions(${target} INTERFACE
+ $<$<BOOL:${HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR}>:HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR>
+ )
endfunction()
set(_libevent_components core extra)