set(${HEX} ${XNUMBER} PARENT_SCOPE)
endfunction()
+#
+# libmemcached
+#
+
set(LIBMEMCACHED_VERSION_MAJOR 1)
set(LIBMEMCACHED_VERSION_MINOR 0)
set(LIBMEMCACHED_VERSION_PATCH 99)
set(LIBMEMCACHED_VERSION ${LIBMEMCACHED_VERSION_MAJOR}.${LIBMEMCACHED_VERSION_MINOR}.${LIBMEMCACHED_VERSION_PATCH})
+set(LIBMEMCACHED_VERSION_INC ${LIBMEMCACHED_VERSION_MAJOR}.${LIBMEMCACHED_VERSION_MINOR})
to_hex(LIBMEMCACHED_VERSION_HEX ${LIBMEMCACHED_VERSION_MAJOR} ${LIBMEMCACHED_VERSION_MINOR} ${LIBMEMCACHED_VERSION_PATCH})
+# libmemcached.so
+
set(LIBMEMCACHED_SO_VERSION_CUR 12)
set(LIBMEMCACHED_SO_VERSION_REV 0)
set(LIBMEMCACHED_SO_VERSION_AGE 0)
set(LIBMEMCACHED_SO_VERSION ${LIBMEMCACHED_SO_VERSION_CUR}.${LIBMEMCACHED_SO_VERSION_REV}.${LIBMEMCACHED_SO_VERSION_AGE})
+#
+# libmemcachedutil
+#
+
+set(LIBMEMCACHEDUTIL_VERSION_MAJOR 1)
+set(LIBMEMCACHEDUTIL_VERSION_MINOR 0)
+set(LIBMEMCACHEDUTIL_VERSION_PATCH 0)
+
+set(LIBMEMCACHEDUTIL_VERSION ${LIBMEMCACHEDUTIL_VERSION_MAJOR}.${LIBMEMCACHEDUTIL_VERSION_MINOR}.${LIBMEMCACHEDUTIL_VERSION_PATCH})
+set(LIBMEMCACHEDUTIL_VERSION_INC ${LIBMEMCACHEDUTIL_VERSION_MAJOR}.${LIBMEMCACHEDUTIL_VERSION_MINOR})
+to_hex(LIBMEMCACHEDUTIL_VERSION_HEX ${LIBMEMCACHEDUTIL_VERSION_MAJOR} ${LIBMEMCACHEDUTIL_VERSION_MINOR} ${LIBMEMCACHEDUTIL_VERSION_PATCH})
+
+# libmemcachedutil.so
+
set(LIBMEMCACHEDUTIL_SO_VERSION_CUR 2)
set(LIBMEMCACHEDUTIL_SO_VERSION_REV 0)
set(LIBMEMCACHEDUTIL_SO_VERSION_AGE 0)
set(LIBMEMCACHEDUTIL_SO_VERSION ${LIBMEMCACHEDUTIL_SO_VERSION_CUR}.${LIBMEMCACHEDUTIL_SO_VERSION_REV}.${LIBMEMCACHEDUTIL_SO_VERSION_AGE})
+#
+# libmemcachedprotocol
+#
+
+set(LIBMEMCACHEDPROTOCOL_VERSION_MAJOR 0)
+set(LIBMEMCACHEDPROTOCOL_VERSION_MINOR 0)
+set(LIBMEMCACHEDPROTOCOL_VERSION_PATCH 0)
+
+set(LIBMEMCACHEDPROTOCOL_VERSION ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR}.${LIBMEMCACHEDPROTOCOL_VERSION_MINOR}.${LIBMEMCACHEDPROTOCOL_VERSION_PATCH})
+set(LIBMEMCACHEDPROTOCOL_VERSION_INC ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR}.${LIBMEMCACHEDPROTOCOL_VERSION_MINOR})
+to_hex(LIBMEMCACHEDPROTOCOL_VERSION_HEX ${LIBMEMCACHEDPROTOCOL_VERSION_MAJOR} ${LIBMEMCACHEDPROTOCOL_VERSION_MINOR} ${LIBMEMCACHEDPROTOCOL_VERSION_PATCH})
+
+# libmemcachedprotocol.so
+
set(LIBMEMCACHEDPROTOCOL_SO_VERSION_CUR 0)
set(LIBMEMCACHEDPROTOCOL_SO_VERSION_REV 0)
set(LIBMEMCACHEDPROTOCOL_SO_VERSION_AGE 0)
set(LIBMEMCACHEDPROTOCOL_SO_VERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION_CUR}.${LIBMEMCACHEDPROTOCOL_SO_VERSION_REV}.${LIBMEMCACHEDPROTOCOL_SO_VERSION_AGE})
+#
+# libhashkit
+#
+
set(LIBHASHKIT_VERSION_MAJOR 1)
set(LIBHASHKIT_VERSION_MINOR 0)
set(LIBHASHKIT_VERSION_PATCH 0)
set(LIBHASHKIT_VERSION ${LIBHASHKIT_VERSION_MAJOR}.${LIBHASHKIT_VERSION_MINOR}.${LIBHASHKIT_VERSION_PATCH})
+set(LIBHASHKIT_VERSION_INC ${LIBHASHKIT_VERSION_MAJOR}.${LIBHASHKIT_VERSION_MINOR})
to_hex(LIBHASHKIT_VERSION_HEX ${LIBHASHKIT_VERSION_MAJOR} ${LIBHASHKIT_VERSION_MINOR} ${LIBHASHKIT_VERSION_PATCH})
+# libhashkit.so
+
set(LIBHASHKIT_SO_VERSION_CUR 2)
set(LIBHASHKIT_SO_VERSION_REV 0)
set(LIBHASHKIT_SO_VERSION_AGE 0)
--- /dev/null
+
+add_library(libmemcachedprotocol SHARED
+ ascii_handler.c
+ binary_handler.c
+ cache.c
+ common.h
+ handler.c
+ pedantic.c
+ )
+add_library(memcachedprotocol ALIAS libmemcachedprotocol)
+set_target_properties(libmemcachedprotocol PROPERTIES LIBRARY_OUTPUT_NAME memcachedprotocol)
+target_compile_definitions(libmemcachedprotocol PRIVATE -DBUILDING_LIBMEMCACHED)
+target_link_libraries(libmemcachedprotocol libmemcached Threads::Threads)
+
+set_target_properties(libmemcachedprotocol PROPERTIES SOVERSION ${LIBMEMCACHEDPROTOCOL_SO_VERSION})
+install(TARGETS libmemcachedprotocol EXPORT libmemcachedprotocol
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+export(EXPORT libmemcachedprotocol)
+install(EXPORT libmemcachedprotocol DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake)