2023-07-20 11:48:13 +02:00
|
|
|
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
|
2020-10-10 15:22:26 +02:00
|
|
|
|
|
|
|
project(cppzmq-examples CXX)
|
|
|
|
|
|
|
|
# place binaries and libraries according to GNU standards
|
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
|
|
|
find_package(Threads)
|
2021-02-02 22:04:37 +01:00
|
|
|
find_package(cppzmq)
|
2020-10-10 15:22:26 +02:00
|
|
|
|
|
|
|
add_executable(
|
|
|
|
pubsub_multithread_inproc
|
|
|
|
pubsub_multithread_inproc.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
pubsub_multithread_inproc
|
2020-10-10 15:39:42 +02:00
|
|
|
PRIVATE cppzmq ${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(
|
|
|
|
hello_world
|
|
|
|
hello_world.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
hello_world
|
|
|
|
PRIVATE cppzmq ${CMAKE_THREAD_LIBS_INIT}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(
|
|
|
|
multipart_messages
|
|
|
|
multipart_messages.cpp
|
|
|
|
)
|
|
|
|
target_link_libraries(
|
|
|
|
multipart_messages
|
|
|
|
PRIVATE cppzmq ${CMAKE_THREAD_LIBS_INIT}
|
2020-10-10 15:22:26 +02:00
|
|
|
)
|