diff options
Diffstat (limited to 'src/protocol')
| -rw-r--r-- | src/protocol/bus0/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | src/protocol/pair0/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | src/protocol/pipeline0/CMakeLists.txt | 24 | ||||
| -rw-r--r-- | src/protocol/pubsub0/CMakeLists.txt | 25 | ||||
| -rw-r--r-- | src/protocol/reqrep0/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/protocol/survey0/CMakeLists.txt | 28 |
6 files changed, 29 insertions, 74 deletions
diff --git a/src/protocol/bus0/CMakeLists.txt b/src/protocol/bus0/CMakeLists.txt index 1f144438..1115e2ec 100644 --- a/src/protocol/bus0/CMakeLists.txt +++ b/src/protocol/bus0/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +# Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> # Copyright 2018 Capitar IT Group BV <info@capitar.com> # # This software is supplied under the terms of the MIT License, a @@ -12,10 +12,6 @@ option (NNG_PROTO_BUS0 "Enable BUSv0 protocol." ON) mark_as_advanced(NNG_PROTO_BUS0) -if (NNG_PROTO_BUS0) - set(_DEFS -DNNG_HAVE_BUS0) - set(_SRCS protocol/bus0/bus.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/bus0/bus.h) - - set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) - set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) -endif() +nng_sources_if(NNG_PROTO_BUS0 bus.c) +nng_headers_if(NNG_PROTO_BUS0 nng/protocol/bus0/bus.h) +nng_defines_if(NNG_PROTO_BUS0 NNG_HAVE_BUS0)
\ No newline at end of file diff --git a/src/protocol/pair0/CMakeLists.txt b/src/protocol/pair0/CMakeLists.txt index 72d04888..c3da1b07 100644 --- a/src/protocol/pair0/CMakeLists.txt +++ b/src/protocol/pair0/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +# Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> # Copyright 2018 Capitar IT Group BV <info@capitar.com> # # This software is supplied under the terms of the MIT License, a @@ -12,10 +12,6 @@ option (NNG_PROTO_PAIR0 "Enable PAIRv0 protocol." ON) mark_as_advanced(NNG_PROTO_PAIR0) -if (NNG_PROTO_PAIR0) - set(_DEFS -DNNG_HAVE_PAIR0) - set(_SRCS protocol/pair0/pair.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pair0/pair.h) - - set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) - set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) -endif() +nng_sources_if(NNG_PROTO_PAIR0 pair.c) +nng_headers_if(NNG_PROTO_PAIR0 nng/protocol/pair0/pair.h) +nng_defines_if(NNG_PROTO_PAIR0 NNG_HAVE_PAIR0)
\ No newline at end of file diff --git a/src/protocol/pipeline0/CMakeLists.txt b/src/protocol/pipeline0/CMakeLists.txt index f4de4475..0e211cf5 100644 --- a/src/protocol/pipeline0/CMakeLists.txt +++ b/src/protocol/pipeline0/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +# Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> # Copyright 2018 Capitar IT Group BV <info@capitar.com> # # This software is supplied under the terms of the MIT License, a @@ -15,20 +15,10 @@ mark_as_advanced(NNG_PROTO_PUSH0) option (NNG_PROTO_PULL0 "Enable PULLv0 protocol." ON) mark_as_advanced(NNG_PROTO_PULL0) -set(_DEFS) -set(_SRCS) +nng_sources_if(NNG_PROTO_PUSH0 push.c) +nng_headers_if(NNG_PROTO_PUSH0 nng/protocol/pipeline0/push.h) +nng_defines_if(NNG_PROTO_PUSH0 NNG_HAVE_PUSH0) -if (NNG_PROTO_PUSH0) - list(APPEND _SRCS protocol/pipeline0/push.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pipeline0/push.h) - - list(APPEND _DEFS -DNNG_HAVE_PUSH0) -endif() - -if (NNG_PROTO_PULL0) - list(APPEND _SRCS protocol/pipeline0/pull.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pipeline0/pull.h) - - list(APPEND _DEFS -DNNG_HAVE_PULL0) -endif() - -set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) -set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) +nng_sources_if(NNG_PROTO_PULL0 pull.c) +nng_headers_if(NNG_PROTO_PULL0 nng/protocol/pipeline0/pull.h) +nng_defines_if(NNG_PROTO_PULL0 NNG_HAVE_PULL0)
\ No newline at end of file diff --git a/src/protocol/pubsub0/CMakeLists.txt b/src/protocol/pubsub0/CMakeLists.txt index 12872063..23874662 100644 --- a/src/protocol/pubsub0/CMakeLists.txt +++ b/src/protocol/pubsub0/CMakeLists.txt @@ -15,23 +15,10 @@ mark_as_advanced(NNG_PROTO_PUB0) option (NNG_PROTO_SUB0 "Enable SUBv0 protocol." ON) mark_as_advanced(NNG_PROTO_SUB0) -set(_DEFS) -set(_SRCS) +nng_sources_if(NNG_PROTO_PUB0 pub.c) +nng_headers_if(NNG_PROTO_PUB0 nng/protocol/pubsub0/pub.h) +nng_defines_if(NNG_PROTO_PUB0 NNG_HAVE_PUB0) -if (NNG_PROTO_PUB0) - list(APPEND _DEFS -DNNG_HAVE_PUB0) - list(APPEND _SRCS protocol/pubsub0/pub.c ${PROJECT_SOURCE_DIR}/include/nng/protocol/pubsub0/pub.h) - -endif() - -if (NNG_PROTO_SUB0) - list(APPEND _DEFS -DNNG_HAVE_SUB0) - list(APPEND _SRCS - protocol/pubsub0/sub.c - protocol/pubsub0/xsub.c - ${PROJECT_SOURCE_DIR}/include/nng/protocol/pubsub0/sub.h) - -endif() - -set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) -set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) +nng_sources_if(NNG_PROTO_SUB0 sub.c xsub.c) +nng_headers_if(NNG_PROTO_SUB0 nng/protocol/pubsub0/sub.h) +nng_defines_if(NNG_PROTO_SUB0 NNG_HAVE_SUB0)
\ No newline at end of file diff --git a/src/protocol/reqrep0/CMakeLists.txt b/src/protocol/reqrep0/CMakeLists.txt index 4778f4ea..84c25c0e 100644 --- a/src/protocol/reqrep0/CMakeLists.txt +++ b/src/protocol/reqrep0/CMakeLists.txt @@ -23,4 +23,4 @@ nng_sources_if(NNG_PROTO_REP0 rep.c xrep.c) nng_headers_if(NNG_PROTO_REP0 nng/protocol/reqrep0/rep.h) nng_defines_if(NNG_PROTO_REP0 NNG_HAVE_REP0) -nng_test(reqrep_test) +nng_test(reqrep_test)
\ No newline at end of file diff --git a/src/protocol/survey0/CMakeLists.txt b/src/protocol/survey0/CMakeLists.txt index 260c3e58..271afabf 100644 --- a/src/protocol/survey0/CMakeLists.txt +++ b/src/protocol/survey0/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +# Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> # Copyright 2018 Capitar IT Group BV <info@capitar.com> # # This software is supplied under the terms of the MIT License, a @@ -15,24 +15,10 @@ mark_as_advanced(NNG_PROTO_RESPONDENT0) option (NNG_PROTO_SURVEYOR0 "Enable SURVEYORv0 protocol." ON) mark_as_advanced(NNG_PROTO_SURVEYOR0) -set(_DEFS) -set(_SRCS) +nng_sources_if(NNG_PROTO_SURVEYOR0 survey.c xsurvey.c) +nng_headers_if(NNG_PROTO_SURVEYOR0 nng/protocol/survey0/survey.h) +nng_defines_if(NNG_PROTO_SURVEYOR0 NNG_HAVE_SURVEYOR0) -if (NNG_PROTO_SURVEYOR0) - list(APPEND _DEFS -DNNG_HAVE_SURVEYOR0) - list(APPEND _SRCS - protocol/survey0/survey.c protocol/survey0/xsurvey.c - ${PROJECT_SOURCE_DIR}/include/nng/protocol/survey0/survey.h) - -endif() - -if (NNG_PROTO_RESPONDENT0) - list(APPEND _DEFS -DNNG_HAVE_RESPONDENT0) - list(APPEND _SRCS - protocol/survey0/respond.c protocol/survey0/xrespond.c - ${PROJECT_SOURCE_DIR}/include/nng/protocol/survey0/respond.h) - -endif() - -set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) -set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) +nng_sources_if(NNG_PROTO_RESPONDENT0 respond.c xrespond.c) +nng_headers_if(NNG_PROTO_RESPONDENT0 nng/protocol/survey0/respond.h) +nng_defines_if(NNG_PROTO_RESPONDENT0 NNG_HAVE_RESPONDENT0)
\ No newline at end of file |
