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"