From 6c2ef4c9d8714dd898215f807af6283eb3efe543 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Tue, 6 Mar 2012 12:49:36 +0100 Subject: [PATCH] place for python binding --- plugin/CMakeLists.txt | 1 + plugin/python/CMakeLists.txt | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 plugin/python/CMakeLists.txt diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index 6df16409..798bc96f 100644 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -1 +1,2 @@ ADD_SUBDIRECTORY(cpp) +ADD_SUBDIRECTORY(python) diff --git a/plugin/python/CMakeLists.txt b/plugin/python/CMakeLists.txt new file mode 100644 index 00000000..5bc15fb8 --- /dev/null +++ b/plugin/python/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 2.6) + +if (PROTOBUF_FOUND) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/protocol_pb2.py + COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} --python_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_BINARY_DIR}/../../include/transport/ ${CMAKE_CURRENT_BINARY_DIR}/../../include/transport/protocol.proto + COMMENT "Running Python protocol buffer compiler on protocol.proto" + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/../../include/transport/protocol.proto + ) + ADD_CUSTOM_TARGET(pb-python DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/protocol_pb2.py) +endif() + +