diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-03-26 01:24:11 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-03-26 01:24:11 +0100 |
commit | 499a15993293bf3a793690bd8fe75a2459febb73 (patch) | |
tree | 5e53f24f98fb04ea808bee5c0fd0a686919cae49 /contrib/protoc-bnet/CMakeLists.txt | |
parent | 092d52080f3c8378bc3e5f35b7066c03500314e2 (diff) |
Contrib: Added sources of the protoc plugin used to generate services
Diffstat (limited to 'contrib/protoc-bnet/CMakeLists.txt')
-rw-r--r-- | contrib/protoc-bnet/CMakeLists.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/protoc-bnet/CMakeLists.txt b/contrib/protoc-bnet/CMakeLists.txt new file mode 100644 index 00000000000..77cecaecdb0 --- /dev/null +++ b/contrib/protoc-bnet/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.0) +project(protoc_bnet) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + +find_package(Protobuf REQUIRED) + +file(GLOB_RECURSE SOURCE_PROTOBUF_CPP google/protobuf/*.cc) + +set(SOURCE_FILES + main.cpp + BnetCodeGenerator.cpp + BnetFileGenerator.cpp + BnetServiceGenerator.cpp + method_options.pb.cc + service_options.pb.cc + ${SOURCE_PROTOBUF_CPP}) + +include_directories(${CMAKE_SOURCE_DIR} ${PROTOBUF_INCLUDE_DIRS}) + +add_executable(protoc-gen-bnet ${SOURCE_FILES}) + +target_link_libraries(protoc-gen-bnet ${PROTOBUF_PROTOC_LIBRARIES} ${PROTOBUF_LIBRARIES}) + +set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}) + +add_custom_target(install_plugin + make install + DEPENDS protoc-gen-bnet + COMMENT "Installing protoc_bnet") + +install(TARGETS protoc-gen-bnet DESTINATION bin) |