diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e53917cb..d6ed6643 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,15 @@ include(EthExecutableHelper) # Include utils include(EthUtils) +# Create license.h from LICENSE.txt and template +# 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 ";" ",\n\t0x" LICENSE_TEXT "${LICENSE_TEXT}") +set(LICENSE_TEXT "0x${LICENSE_TEXT}") + +configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/license.h.in" "license.h") + include(EthOptions) configure_project(TESTS) |