Revert "semver: 1.0 -> 1"
[awesomized/libmemcached] / CMakeVersions.txt
index 4917c947afd5f4e4e669f4c7cf457842d15f9ef5..aa77bdaa1815c2a76f1e7bec678cc61fb85f5952 100644 (file)
@@ -1,15 +1,18 @@
 function(to_hex HEX)
+    # mind you, not really hexadecimal, but just a decimal in hex notation, huh?!
     set(XNUMBER 0x)
-    set(XDIGITS 0 1 2 3 4 5 6 7 8 9 a b c d e f)
     foreach(DEC IN LISTS ARGN)
-        if(${DEC} GREATER 255)
-            message(WARNING "to_hex(HEX ${DEC}): decimal number out of uint8 range (>=256)")
+        while(1)
+            string(LENGTH "${DEC}" LEN)
+            if(LEN GREATER_EQUAL 3)
+                break()
+            endif()
+            string(CONCAT DEC "0" "${DEC}")
+        endwhile()
+        if(DEC GREATER 999)
+            message(WARNING "to_hex(HEX ${DEC}): decimal wider than 3 digits")
         endif()
-        math(EXPR HIDEC "${DEC} / 16")
-        math(EXPR LODEC "${DEC} % 16")
-        list(GET XDIGITS ${HIDEC} HIHEX)
-        list(GET XDIGITS ${LODEC} LOHEX)
-        string(APPEND XNUMBER ${HIHEX}${LOHEX})
+        string(APPEND XNUMBER ${DEC})
     endforeach()
     set(${HEX} ${XNUMBER} PARENT_SCOPE)
 endfunction()
@@ -28,7 +31,7 @@ to_hex(LIBMEMCACHED_VERSION_HEX ${LIBMEMCACHED_VERSION_MAJOR} ${LIBMEMCACHED_VER
 
 # libmemcached.so
 
-set(LIBMEMCACHED_SO_VERSION_CUR 12)
+set(LIBMEMCACHED_SO_VERSION_CUR 11)
 set(LIBMEMCACHED_SO_VERSION_REV 0)
 set(LIBMEMCACHED_SO_VERSION_AGE 0)