diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-11-05 13:54:40 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-11-05 16:20:23 -0800 |
| commit | 77984b14a65c0a7387c97f3d36f947dd17358744 (patch) | |
| tree | d95ad88933c9fe8853cbc74fe8dc1492d60ad443 /src/protocol/pipeline0 | |
| parent | db92342b43d429b8b07244cc003a8589a1b1c542 (diff) | |
| download | nng-77984b14a65c0a7387c97f3d36f947dd17358744.tar.gz nng-77984b14a65c0a7387c97f3d36f947dd17358744.tar.bz2 nng-77984b14a65c0a7387c97f3d36f947dd17358744.zip | |
fixes #577 target library dependencies should be public
This is a significant refactor of the library configuration.
We use the modern package configuration helper, with a template
script that also does the find_package dance for any of our
dependencies.
We also have restructured the code so that most protocols and
transports have their configuration isolated to their own CMakeLists
file, reducing the size of the global CMakeLists file.
Diffstat (limited to 'src/protocol/pipeline0')
| -rw-r--r-- | src/protocol/pipeline0/CMakeLists.txt | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/protocol/pipeline0/CMakeLists.txt b/src/protocol/pipeline0/CMakeLists.txt index 669fb9dc..675cb961 100644 --- a/src/protocol/pipeline0/CMakeLists.txt +++ b/src/protocol/pipeline0/CMakeLists.txt @@ -8,17 +8,29 @@ # found online at https://opensource.org/licenses/MIT. # -# Pub/Sub protocol +# Pipeline protocol +option (NNG_PROTO_PUSH0 "Enable PUSHv0 protocol." ON) +mark_as_advanced(NNG_PROTO_PUSH0) + +option (NNG_PROTO_PULL0 "Enable PULLv0 protocol." ON) +mark_as_advanced(NNG_PROTO_PULL0) + +set(_DEFS) +set(_HDRS) +set(_SRCS) if (NNG_PROTO_PUSH0) - set(PUSH0_SOURCES protocol/pipeline0/push.c protocol/pipeline0/push.h) - set(PUSH0_HEADERS protocol/pipeline0/push.h) + list(APPEND _SRCS protocol/pipeline0/push.c protocol/pipeline0/push.h) + list(APPEND _HDRS protocol/pipeline0/push.h) + list(APPEND _DEFS -DNNG_HAVE_PUSH0) endif() if (NNG_PROTO_PULL0) - set(PULL0_SOURCES protocol/pipeline0/pull.c protocol/pipeline0/pull.h) - set(PULL0_HEADERS protocol/pipeline0/pull.h) + list(APPEND _SRCS protocol/pipeline0/pull.c protocol/pipeline0/pull.h) + list(APPEND _HDRS protocol/pipeline0/pull.h) + list(APPEND _DEFS -DNNG_HAVE_PULL0) endif() -set(NNG_SOURCES ${NNG_SOURCES} ${PUSH0_SOURCES} ${PULL0_SOURCES} PARENT_SCOPE) -set(NNG_HEADERS ${NNG_HEADERS} ${PUSH0_HEADERS} ${PULL0_HEADERS} PARENT_SCOPE) +set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE) +set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE) +set(NNG_HDRS ${NNG_HDRS} ${_HDRS} PARENT_SCOPE) |
