From 3238c94f433846f80455855bccfdb2164f67e32f Mon Sep 17 00:00:00 2001 From: Sergey Batanov Date: Wed, 4 Jul 2018 18:26:25 +0300 Subject: [PATCH] Fix #83: define LIBRDKAFKA_STATICLIB (#99) * Fix #83: define LIBRDKAFKA_STATICLIB * Moved LIBRDKAFKA_STATICLIB definition --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28b9d15..27303c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ if(MSVC) add_definitions("-D_CRT_SECURE_NO_WARNINGS=1") add_definitions("-D_SCL_SECURE_NO_WARNINGS=1") add_definitions("-DNOGDI=1") + add_definitions("-DNOMINMAX=1") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") endif() @@ -48,6 +49,10 @@ else() add_definitions("-DCPPKAFKA_STATIC=1") endif() +if (CPPKAFKA_RDKAFKA_STATIC_LIB) + add_definitions("-DLIBRDKAFKA_STATICLIB") +endif() + # Look for Boost (just need boost.optional headers here) find_package(Boost REQUIRED ${FIND_PACKAGE_QUIET}) find_package(RdKafka REQUIRED ${FIND_PACKAGE_QUIET})