Changed: Generate version_nl.h in include/nel/misc

--HG--
branch : develop
hg/compatibility-develop
kervala 6 years ago
parent 5cb3f8426d
commit 307eb77e63

@ -86,12 +86,12 @@ NL_SETUP_NELNS_DEFAULT_OPTIONS()
NL_SETUP_RYZOM_DEFAULT_OPTIONS() NL_SETUP_RYZOM_DEFAULT_OPTIONS()
NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS() NL_SETUP_SNOWBALLS_DEFAULT_OPTIONS()
NL_SETUP_PREFIX_PATHS()
RYZOM_SETUP_PREFIX_PATHS()
NL_SETUP_BUILD() NL_SETUP_BUILD()
NL_SETUP_BUILD_FLAGS() NL_SETUP_BUILD_FLAGS()
NL_SETUP_PREFIX_PATHS()
RYZOM_SETUP_PREFIX_PATHS()
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#Platform specifics #Platform specifics

@ -374,6 +374,13 @@ MACRO(ADD_PLATFORM_LINKFLAGS _FLAGS)
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${_FLAGS}") SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ${_FLAGS}")
ENDMACRO() ENDMACRO()
MACRO(CONVERT_VERSION_NUMBER _VERSION_NUMBER _BASE)
SET(${_VERSION_NUMBER} 0)
FOREACH(_ARG ${ARGN})
MATH(EXPR ${_VERSION_NUMBER} "${${_VERSION_NUMBER}} * ${_BASE} + ${_ARG}")
ENDFOREACH()
ENDMACRO()
MACRO(NL_SETUP_BUILD) MACRO(NL_SETUP_BUILD)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------

@ -1,3 +1,7 @@
CONVERT_VERSION_NUMBER(NL_VERSION_NUM 100 ${NL_VERSION_MAJOR} ${NL_VERSION_MINOR} ${NL_VERSION_PATCH})
CONFIGURE_FILE(version_nl.cmake ${CMAKE_BINARY_DIR}/version_nl.h)
FILE(GLOB HEADERS *.h) FILE(GLOB HEADERS *.h)
INSTALL(FILES ${HEADERS} DESTINATION include/nel/misc COMPONENT headers) INSTALL(FILES ${HEADERS} ${CMAKE_BINARY_DIR}/version_nl.h DESTINATION include/nel/misc COMPONENT headers)

@ -0,0 +1,14 @@
#ifndef NL_VERSION_H
#define NL_VERSION_H
#define NL_VERSION "${NL_VERSION}"
#define NL_VERSION_MAJOR ${NL_VERSION_MAJOR}
#define NL_VERSION_MINOR ${NL_VERSION_MINOR}
#define NL_VERSION_PATCH ${NL_VERSION_PATCH}
#define NL_VERSION_NUM ${NL_VERSION_NUM}
#define NL_REVISION ${REVISION}
#define NL_BUILD_DATE "${BUILD_DATE}"
#endif
Loading…
Cancel
Save