place for python binding

This commit is contained in:
Jan Kaluza 2012-03-06 12:49:36 +01:00
parent c990770ecf
commit 6c2ef4c9d8
2 changed files with 14 additions and 0 deletions

View file

@ -1 +1,2 @@
ADD_SUBDIRECTORY(cpp)
ADD_SUBDIRECTORY(python)

View file

@ -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()