From eb328da56c3fc7167b536dcb206df0abb0f4a9b9 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 13 Nov 2020 22:31:18 -0800 Subject: fixes #1087 CMakeLists structural improvements desired This doesn't modularize all the tests yet, but it goes a long way in the right direction. --- src/supplemental/http/CMakeLists.txt | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'src/supplemental/http') diff --git a/src/supplemental/http/CMakeLists.txt b/src/supplemental/http/CMakeLists.txt index 2b8696b6..324484d8 100644 --- a/src/supplemental/http/CMakeLists.txt +++ b/src/supplemental/http/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2018 Staysail Systems, Inc. +# Copyright 2020 Staysail Systems, Inc. # Copyright 2018 Capitar IT Group BV # # This software is supplied under the terms of the MIT License, a @@ -13,20 +13,15 @@ if (NNG_ENABLE_HTTP) set(NNG_SUPP_HTTP ON) endif() mark_as_advanced(NNG_ENABLE_HTTP) -set(_SRCS supplemental/http/http_public.c - ${PROJECT_SOURCE_DIR}/include/nng/supplemental/http/http.h - supplemental/http/http_api.h) -if (NNG_SUPP_HTTP) - set(_DEFS -DNNG_SUPP_HTTP) - list(APPEND _SRCS - supplemental/http/http_client.c - supplemental/http/http_chunk.c - supplemental/http/http_conn.c - supplemental/http/http_msg.c - supplemental/http/http_public.c - supplemental/http/http_server.c) -endif() +nng_sources(http_public.c http_api.h) +nng_headers(nng/supplemental/http/http.h) -set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) -set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) +nng_defines_if(NNG_SUPP_HTTP NNG_SUPP_HTTP) +nng_sources_if(NNG_SUPP_HTTP + http_client.c + http_chunk.c + http_conn.c + http_msg.c + http_public.c + http_server.c) -- cgit v1.2.3-70-g09d2