]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: define BUILDING_LIBCURL in lib/CMakeLists, not config.h
authorDaniel Stenberg <daniel@haxx.se>
Tue, 13 Sep 2022 12:43:40 +0000 (14:43 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 14 Sep 2022 06:06:41 +0000 (08:06 +0200)
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
lib/curl_config.h.cmake

index 24226fcd82e4b7091c85a1b5f5fe3bbb29da5e68..4ec5c06560a8c70a7226dd79574e9a2011930194 100644 (file)
@@ -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)
index 6e552870460af47abb8b0f49a95cf28dc1cd4e2d..8654fd0061af127d2ece28af4ef60dc4a75a1b9a 100644 (file)
@@ -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}"