Allow the option to disable Python wrapper compilation
@@ -24,6 +24,9 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules")
option(BUILD_TESTS "Build tests" ON)
MESSAGE(STATUS "BUILD_TESTS: " ${BUILD_TESTS})
+option(BUILD_PYTHON_WRAPPER "Build Pulsar Python wrapper" ON)
+MESSAGE(STATUS "BUILD_PYTHON_WRAPPER: " ${BUILD_PYTHON_WRAPPER})
+
option(LINK_STATIC "Link against static libraries" OFF)
MESSAGE(STATUS "LINK_STATIC: " ${LINK_STATIC})
@@ -101,10 +104,10 @@ else()
endif (USE_LOG4CXX)
endif (LINK_STATIC)
+find_package(Boost REQUIRED COMPONENTS program_options filesystem regex thread system)
+if (BUILD_PYTHON_WRAPPER)
find_package(PythonLibs REQUIRED)
-
-
MESSAGE(STATUS "PYTHON: " ${PYTHONLIBS_VERSION_STRING})
if (PYTHONLIBS_VERSION_STRING MATCHES "^3.+$")
@@ -132,8 +135,8 @@ if (NOT ${Boost_FOUND})
MESSAGE(FATAL_ERROR "Could not find Boost Python library")
endif ()
-find_package(Boost REQUIRED COMPONENTS program_options filesystem regex
- thread system ${BOOST_PYTHON_NAME_FOUND})
+ find_package(Boost REQUIRED COMPONENTS ${BOOST_PYTHON_NAME_FOUND})
+endif (BUILD_PYTHON_WRAPPER)
if (APPLE)
set(OPENSSL_INCLUDE_DIR /usr/local/opt/openssl/include/)
@@ -243,7 +246,9 @@ if (BUILD_TESTS)
add_subdirectory(tests)
endif()
+if (BUILD_PYTHON_WRAPPER)
add_subdirectory(python)
+endif ()
# `make format` option
if (NOT APPLE)
