Convert license to character array.

This commit is contained in:
chriseth 2017-06-14 12:42:48 +02:00
parent d3f4c97c53
commit 1d79059897
2 changed files with 8 additions and 2 deletions

View File

@ -25,7 +25,11 @@ include(EthExecutableHelper)
include(EthUtils)
# Create license.h from LICENSE.txt and template
file(READ ${CMAKE_SOURCE_DIR}/LICENSE.txt LICENSE_TEXT)
# Converting to char array is required due to MSVC's string size limit.
file(READ ${CMAKE_SOURCE_DIR}/LICENSE.txt LICENSE_TEXT HEX)
string(REGEX MATCHALL ".." LICENSE_TEXT "${LICENSE_TEXT}")
string(REGEX REPLACE ";" ",\t0x" LICENSE_TEXT "${LICENSE_TEXT}")
configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/license.h.in" "license.h")
include(EthOptions)

View File

@ -1,3 +1,5 @@
#pragma once
static char const* licenseText = R"(@LICENSE_TEXT@)";
static char licenseText[] = {
0x@LICENSE_TEXT@
};