]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: configure c-ares header directory in project root (was: lib)
authorViktor Szakats <commit@vsz.me>
Sun, 22 Jun 2025 18:10:55 +0000 (20:10 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 22 Jun 2025 19:41:03 +0000 (21:41 +0200)
The c-ares header directory was added to the header path within `lib`,
as opposed to every other dependency which added them in the root
`CMakeLists.txt`. Such exception is no longer necessary. This patch
aligns c-ares header setup with the rest of dependencies. And also with
autotools, which also makes no exception here.

Cherry-picked from #17705
Cherry-picked from #16973

Closes #17707

CMakeLists.txt
lib/CMakeLists.txt

index addc38fa3ae6aa2320c20820422a17b1db9eff34..a20d19a8d22469d1c8228903f8e3d8b5a63a2382 100644 (file)
@@ -373,6 +373,7 @@ if(ENABLE_ARES)
   list(APPEND CURL_LIBS ${CARES_LIBRARIES})
   list(APPEND CURL_LIBDIRS ${CARES_LIBRARY_DIRS})
   list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${CARES_PC_REQUIRES})
+  include_directories(SYSTEM ${CARES_INCLUDE_DIRS})
   link_directories(${CARES_LIBRARY_DIRS})
   if(CARES_CFLAGS)
     string(APPEND CMAKE_C_FLAGS " ${CARES_CFLAGS}")
index d369d4eaf3c4f9ad62da7e98ab19aead73239cf6..8f158c389269d676c724c33bba194b0c66f17e37 100644 (file)
@@ -41,10 +41,6 @@ set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES
   "${PROJECT_BINARY_DIR}/lib"        # for "curl_config.h"
 )
 
-if(USE_ARES)
-  include_directories(SYSTEM ${CARES_INCLUDE_DIRS})
-endif()
-
 if(CURL_BUILD_TESTING)
   # special libcurlu library just for unittests
   add_library(curlu STATIC EXCLUDE_FROM_ALL ${HHEADERS} ${CSOURCES})