Browse Source

nghttp2: provide common cm3p headers

Aliaksandr Averchanka 3 weeks ago
parent
commit
89fd18b48e

+ 11 - 0
Utilities/cm3p/nghttp2/nghttp2.h

@@ -0,0 +1,11 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file LICENSE.rst or https://cmake.org/licensing for details.  */
+#pragma once
+
+/* Use the nghttp2 library configured for CMake.  */
+#include "cmThirdParty.h"
+#ifdef CMAKE_USE_SYSTEM_NGHTTP2
+#  include <nghttp2/nghttp2.h> // IWYU pragma: export
+#else
+#  include <cmnghttp2/lib/includes/nghttp2/nghttp2.h> // IWYU pragma: export
+#endif

+ 1 - 0
Utilities/cmThirdParty.h.in

@@ -16,6 +16,7 @@
 #cmakedefine CMAKE_USE_SYSTEM_LIBRHASH
 #cmakedefine CMAKE_USE_SYSTEM_LIBUV
 #cmakedefine CMAKE_USE_SYSTEM_ZSTD
+#cmakedefine CMAKE_USE_SYSTEM_NGHTTP2
 
 /* Whether CMake is using OpenSSL library.  */
 #cmakedefine CMAKE_USE_OPENSSL

+ 1 - 1
Utilities/cmnghttp2/lib/includes/nghttp2/nghttp2.h

@@ -52,7 +52,7 @@ extern "C" {
 #include <sys/types.h>
 #include <stdarg.h>
 
-#include <nghttp2/nghttp2ver.h>
+#include "nghttp2ver.h"
 
 #ifdef NGHTTP2_STATICLIB
 #  define NGHTTP2_EXTERN