Commit 65d33c55 authored by Peter Wu's avatar Peter Wu

CMake WIP

Not working:
 - option(... check)
 - not finished everything (see XXX and FIXME)
 - still halway converting
parent 25930360
This diff is collapsed.
# Converts a version such as 1.2.255 to 0x0102ff
function(HexVersion version_hex_var major minor patch)
math(EXPR version_dec "${major} * 256 * 256 + ${minor} * 256 + ${patch}")
set(version_hex "0x")
foreach(i RANGE 5 0 -1)
math(EXPR num "(${version_dec} >> (4 * ${i})) & 15")
string(SUBSTRING "0123456789abcdef" ${num} 1 num_hex)
set(version_hex "${version_hex}${num_hex}")
endforeach()
set(${version_hex_var} "${version_hex}" PARENT_SCOPE)
endfunction()
/* Define to 1 if you have the `std::map::emplace`. */
#cmakedefine HAVE_STD_MAP_EMPLACE 1
/* Define to 1 if you have `libjansson` library. */
#cmakedefine HAVE_JANSSON 1
/* Define to 1 if you have `libxml2` library. */
#cmakedefine HAVE_LIBXML2 1
/* Define to 1 if you have `spdylay` library. */
#cmakedefine HAVE_SPDYLAY 1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment