mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2026-01-27 10:22:42 +00:00
Improve build system a bit
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
find_package(Boost REQUIRED COMPONENTS program_options)
|
||||
find_package(Boost COMPONENTS program_options)
|
||||
|
||||
link_libraries(${Boost_LIBRARIES} cppkafka ${RDKAFKA_LIBRARY} ${ZOOKEEPER_LIBRARY})
|
||||
if (Boost_PROGRAM_OPTIONS_FOUND)
|
||||
link_libraries(${Boost_LIBRARIES} cppkafka ${RDKAFKA_LIBRARY} ${ZOOKEEPER_LIBRARY})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
add_executable(kafka_producer kafka_producer.cpp)
|
||||
add_executable(kafka_consumer kafka_consumer.cpp)
|
||||
add_executable(kafka_producer kafka_producer.cpp)
|
||||
add_executable(kafka_consumer kafka_consumer.cpp)
|
||||
add_custom_target(examples DEPENDS kafka_producer kafka_consumer)
|
||||
else()
|
||||
message(STATUS "Disabling examples since boost.program_options was not found")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user