From 889c132c38a4920b0ae009f0330a8b905eee83a3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Sep 2022 14:43:40 +0200 Subject: [PATCH] cmake: define BUILDING_LIBCURL in lib/CMakeLists, not config.h Since the config file might also get included by the tool code at times. This syncs with how other builds do it. Closes #9498 --- lib/CMakeLists.txt | 1 + lib/curl_config.h.cmake | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 24226fcd82..4ec5c06560 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -23,6 +23,7 @@ ########################################################################### set(LIB_NAME libcurl) set(LIBCURL_OUTPUT_NAME libcurl CACHE STRING "Basename of the curl library") +add_definitions(-DBUILDING_LIBCURL) if(BUILD_SHARED_LIBS) set(CURL_STATICLIB NO) diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 6e55287046..8654fd0061 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -23,9 +23,6 @@ ***************************************************************************/ /* lib/curl_config.h.in. Generated somehow by cmake. */ -/* when building libcurl itself */ -#cmakedefine BUILDING_LIBCURL 1 - /* Location of default ca bundle */ #cmakedefine CURL_CA_BUNDLE "${CURL_CA_BUNDLE}" -- 2.47.3