From 74c6c926ea142bf5cee1699b8269cbe639655530 Mon Sep 17 00:00:00 2001 From: Renz Christian Bagaporo Date: Wed, 22 May 2019 11:36:03 +0800 Subject: [PATCH] nghttp: move HAVE_CONFIG_H compile definition to component --- components/nghttp/CMakeLists.txt | 2 ++ tools/cmake/build.cmake | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/nghttp/CMakeLists.txt b/components/nghttp/CMakeLists.txt index b1a4b1642..c1c4d8094 100644 --- a/components/nghttp/CMakeLists.txt +++ b/components/nghttp/CMakeLists.txt @@ -24,3 +24,5 @@ set(COMPONENT_SRCS "nghttp2/lib/nghttp2_buf.c" "port/http_parser.c") register_component() + +target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DHAVE_CONFIG_H") diff --git a/tools/cmake/build.cmake b/tools/cmake/build.cmake index 2371c9462..af335d3f1 100644 --- a/tools/cmake/build.cmake +++ b/tools/cmake/build.cmake @@ -91,7 +91,7 @@ function(__build_set_default_build_specifications) unset(c_compile_options) unset(cxx_compile_options) - list(APPEND compile_definitions "-DHAVE_CONFIG_H" "-D_GNU_SOURCE") + list(APPEND compile_definitions "-D_GNU_SOURCE") list(APPEND compile_options "-ffunction-sections" "-fdata-sections"