Skip to content

Commit

Permalink
fixes nanomsg#975 Add CMakeLists for demos
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed May 23, 2018
1 parent fbcd061 commit d27d3b7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# Demonstration CMakeLists.txt for nanomsg demos.
#
# This file shows how one might use nanomsg from a another project
# that is also CMake-driven.
#
# Thanks for the idea goes to @maddouri.
#
cmake_minimum_required (VERSION 2.8.7)

project(nanomsg-demo)

# Call this from your own project's makefile.
find_package(nanomsg CONFIG REQUIRED)

add_executable(async_demo async_demo.c)
target_link_libraries(async_demo nanomsg)

add_executable(device_demo device_demo.c)
target_link_libraries(device_demo nanomsg)

add_executable(pthread_demo pthread_demo.c)
target_link_libraries(pthread_demo nanomsg)

add_executable(pubsub_demo pubsub_demo.c)
target_link_libraries(pubsub_demo nanomsg)

add_executable(rpc_demo rpc_demo.c)
target_link_libraries(rpc_demo nanomsg)
3 changes: 3 additions & 0 deletions demo/README
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ The intention is that you can use these programs (or parts thereof) in
your own code.

We welcome further contributions here.

These have their own CMake driven configuration if you want to build them
all. They are not built automatically.

0 comments on commit d27d3b7

Please sign in to comment.