Perfect version information

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2017-11-22 21:43:03 +08:00
parent 09c950bbac
commit 6ef276ed77
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# The version number.
set(UHTTP_VERSION_MAJOR 0)
set(UHTTP_VERSION_MINOR 1)
set(UHTTP_VERSION_PATCH 0)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
@ -81,7 +82,7 @@ configure_file(uhttp_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/uhttp_config.h)
install(
FILES uhttp.h ${CMAKE_CURRENT_BINARY_DIR}/uhttp_config.h uhttp_log.h uhttp_buf.h
DESTINATION include
DESTINATION include/uhttp
)
install(
@ -90,7 +91,7 @@ install(
)
message("")
message(STATUS "UHTTP_VERSION: ${UHTTP_VERSION_MAJOR}.${UHTTP_VERSION_MINOR}")
message(STATUS "UHTTP_VERSION: ${UHTTP_VERSION_MAJOR}.${UHTTP_VERSION_MINOR}.${UHTTP_VERSION_PATCH}")
if(UHTTP_USE_OPENSSL_CONFIG)
message(STATUS "UHTTP_SSL_ENABLED: OpenSSL")
elseif(UHTTP_USE_CYASSL_CONFIG)

View File

@ -3,7 +3,8 @@
#define UHTTP_VERSION_MAJOR @UHTTP_VERSION_MAJOR@
#define UHTTP_VERSION_MINOR @UHTTP_VERSION_MINOR@
#define UHTTP_VERSION_STRING "@UHTTP_VERSION_MAJOR@.@UHTTP_VERSION_MINOR@"
#define UHTTP_VERSION_PATCH @UHTTP_VERSION_PATCH@
#define UHTTP_VERSION_STRING "@UHTTP_VERSION_MAJOR@.@UHTTP_VERSION_MINOR@.@UHTTP_VERSION_PATCH@"
#define UHTTP_DEBUG @UHTTP_DEBUG_CONFIG@