Skip to content

Instantly share code, notes, and snippets.

@TNick
Created December 14, 2013 00:14
Show Gist options
  • Save TNick/7953945 to your computer and use it in GitHub Desktop.
Save TNick/7953945 to your computer and use it in GitHub Desktop.
CMake file for protobufc in https://github.com/protobuf-c/protobuf-c
cmake_minimum_required(VERSION 2.8)
project(protobufc)
include_directories(
"${PROJECT_SOURCE_DIR}"
)
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIR})
add_library (protobuf-c
protobuf-c/protobuf-c.c
)
add_executable ( protoc-c
protoc-c/c_bytes_field.cc
protoc-c/c_helpers.cc
protoc-c/c_field.cc
protoc-c/c_service.cc
protoc-c/c_enum.cc
protoc-c/c_message.cc
protoc-c/c_file.cc
protoc-c/c_string_field.cc
protoc-c/c_enum_field.cc
protoc-c/c_message_field.cc
protoc-c/c_generator.cc
protoc-c/main.cc
protoc-c/c_extension.cc
protoc-c/c_primitive_field.cc
)
target_link_libraries ( protoc-c
${PROTOBUF_LIBRARY}
${PROTOBUF_PROTOC_LIBRARY}
)
install( TARGETS protoc-c
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
FRAMEWORK DESTINATION "Library/Frameworks"
PUBLIC_HEADER DESTINATION include)
install( TARGETS protobuf-c
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
FRAMEWORK DESTINATION "Library/Frameworks"
PUBLIC_HEADER DESTINATION include)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment