this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixed version file parsing.

+13 -10
+12 -9
CMakeLists.txt
··· 16 16 string(REGEX MATCH "[.][0-9]+[.]" VERSION_MINOR ${VERSION_FILE_CONTENTS}) 17 17 # Chop off the dots 18 18 string(LENGTH ${VERSION_MINOR} VERSION_MINOR_LENGTH) 19 - string(SUBSTRING ${VERSION_MINOR} 1 ${VERSION_MINOR_LENGTH}-2 VERSION_MINOR) 19 + math(EXPR VERSION_MINOR_LENGTH_MINUS_2 "${VERSION_MINOR_LENGTH}-2") 20 + string(SUBSTRING ${VERSION_MINOR} 1 ${VERSION_MINOR_LENGTH_MINUS_2} VERSION_MINOR) 20 21 endif() 21 22 if(NOT DEFINED VERSION_BUGFIX) 22 - string(REGEX MATCH "[0-9]+$" VERSION_MAJOR ${VERSION_FILE_CONTENTS}) 23 + string(REGEX MATCH "[0-9]+$" VERSION_BUGFIX ${VERSION_FILE_CONTENTS}) 23 24 endif() 24 25 25 - set(SDL_gpu_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUGFIX}) 26 + set(SDL_gpu_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUGFIX}") 26 27 27 28 message("Writing version header for v${SDL_gpu_VERSION}") 28 - string(CONCAT VERSION_HEADER_CONTENTS "#ifndef _SDL_GPU_VERSION_H__" 29 - "#define _SDL_GPU_VERSION_H__" 30 - "#define SDL_GPU_VERSION_MAJOR ${VERSION_MAJOR}" 31 - "#define SDL_GPU_VERSION_MINOR ${VERSION_MINOR}" 32 - "#define SDL_GPU_VERSION_PATCH ${VERSION_BUGFIX}" 33 - "#endif") 29 + string(CONCAT VERSION_HEADER_CONTENTS "#ifndef _SDL_GPU_VERSION_H__ 30 + #define _SDL_GPU_VERSION_H__ 31 + 32 + #define SDL_GPU_VERSION_MAJOR ${VERSION_MAJOR} 33 + #define SDL_GPU_VERSION_MINOR ${VERSION_MINOR} 34 + #define SDL_GPU_VERSION_PATCH ${VERSION_BUGFIX} 35 + 36 + #endif") 34 37 file(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/include/SDL_gpu_version.h ${VERSION_HEADER_CONTENTS}) 35 38 36 39 set(SDL_gpu_INSTALL_BY_DEFAULT ON)
+1 -1
include/SDL_gpu_version.h
··· 2 2 #define _SDL_GPU_VERSION_H__ 3 3 4 4 #define SDL_GPU_VERSION_MAJOR 0 5 - #define SDL_GPU_VERSION_MINOR 11 5 + #define SDL_GPU_VERSION_MINOR 12 6 6 #define SDL_GPU_VERSION_PATCH 0 7 7 8 8 #endif