diff options
author | Sander Vrijders <[email protected]> | 2017-03-03 15:01:50 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-03-03 15:01:50 +0100 |
commit | 2852bb1bac8fcc111364d516c2bd31628ad264c7 (patch) | |
tree | 58fa873269b656272f3628c5dd1777270b988455 /cmake/FindProtobufC.cmake | |
parent | 13e438d5bc2350cf3d71a77f6d3c5a54ba436161 (diff) | |
download | ouroboros-2852bb1bac8fcc111364d516c2bd31628ad264c7.tar.gz ouroboros-2852bb1bac8fcc111364d516c2bd31628ad264c7.zip |
build: Format CMakeLists.txt files
The CMakeLists files are now properly indented.
Diffstat (limited to 'cmake/FindProtobufC.cmake')
-rw-r--r-- | cmake/FindProtobufC.cmake | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/cmake/FindProtobufC.cmake b/cmake/FindProtobufC.cmake index 6b81d751..ff532a46 100644 --- a/cmake/FindProtobufC.cmake +++ b/cmake/FindProtobufC.cmake @@ -1,22 +1,22 @@ function(PROTOBUF_GENERATE_C SRCS HDRS) - if(NOT ARGN) + if (NOT ARGN) message(SEND_ERROR "Error: PROTOBUF_GENERATE_C() called without any proto files") return() - endif() + endif () - if(PROTOBUF_GENERATE_C_APPEND_PATH) + if (PROTOBUF_GENERATE_C_APPEND_PATH) # Create an include path for each file specified - foreach(FIL ${ARGN}) + foreach (FIL ${ARGN}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(ABS_PATH ${ABS_FIL} PATH) list(FIND _protobuf_include_path ${ABS_PATH} _contains_already) - if(${_contains_already} EQUAL -1) - list(APPEND _protobuf_include_path -I ${ABS_PATH}) - endif() - endforeach() - else() + if (${_contains_already} EQUAL -1) + list(APPEND _protobuf_include_path -I ${ABS_PATH}) + endif () + endforeach () + else () set(_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR}) - endif() + endif () set(${SRCS}) set(${HDRS}) @@ -29,7 +29,7 @@ function(PROTOBUF_GENERATE_C SRCS HDRS) add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.c" - "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.h" + "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.h" COMMAND ${PROTOBUF_PROTOC_C_EXECUTABLE} ARGS --c_out=${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL} DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_C_EXECUTABLE} @@ -44,31 +44,31 @@ endfunction() # By default have PROTOBUF_GENERATE_C macro pass -I to protoc # for each directory where a proto file is referenced. -if(NOT DEFINED PROTOBUF_GENERATE_C_APPEND_PATH) +if (NOT DEFINED PROTOBUF_GENERATE_C_APPEND_PATH) set(PROTOBUF_GENERATE_C_APPEND_PATH TRUE) -endif() +endif () # Find library find_library(PROTOBUF_C_LIBRARY - NAMES libprotobuf-c.so libprotobuf-c libprotobuf-c.dylib -) + NAMES libprotobuf-c.so libprotobuf-c libprotobuf-c.dylib + ) mark_as_advanced(PROTOBUF_C_LIBRARY) # Find the include directory find_path(PROTOBUF_C_INCLUDE_DIR - google/protobuf-c/protobuf-c.h -) + google/protobuf-c/protobuf-c.h + ) mark_as_advanced(PROTOBUF_C_INCLUDE_DIR) # Find the protoc-c Executable find_program(PROTOBUF_PROTOC_C_EXECUTABLE - NAMES protoc-c - DOC "The Google Protocol Buffers C Compiler" -) + NAMES protoc-c + DOC "The Google Protocol Buffers C Compiler" + ) mark_as_advanced(PROTOBUF_PROTOC_C_EXECUTABLE) find_package(PackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ProtobufC DEFAULT_MSG - PROTOBUF_C_LIBRARY PROTOBUF_C_INCLUDE_DIR PROTOBUF_PROTOC_C_EXECUTABLE) +find_package_handle_standard_args(ProtobufC DEFAULT_MSG + PROTOBUF_C_LIBRARY PROTOBUF_C_INCLUDE_DIR PROTOBUF_PROTOC_C_EXECUTABLE) set(PROTOBUF_C_INCLUDE_DIRS ${PROTOBUF_C_INCLUDE_DIR}) |