Use Client_find_by_session() instead of a few open-coded loops.
[umurmur.git] / cmake / Modules / FindProtobufC.cmake
1 include(FindPackageHandleStandardArgs)
2
3 find_path(PROTOBUFC_INCLUDE_DIR NAMES "protobuf-c.h" PATHS /usr/pkg /usr/local /usr PATH_SUFFIXES "include/google/protobuf-c")
4 find_path(PROTOBUFC_LIB_DIR NAMES "libprotobuf-c.so" "libprotobuf-c.dylib" PATHS /usr/pkg /usr/local /usr PATH_SUFFIXES "lib"  "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
5
6 if(PROTOBUFC_INCLUDE_DIR AND PROTOBUFC_LIB_DIR)
7   set(PROTOBUFC_LIBRARIES protobuf-c)
8 endif(PROTOBUFC_INCLUDE_DIR AND PROTOBUFC_LIB_DIR)
9
10 find_package_handle_standard_args(ProtobufC REQUIRED_VARS PROTOBUFC_INCLUDE_DIR PROTOBUFC_LIBRARIES PROTOBUFC_LIB_DIR)