File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 33#
44
55cmake_minimum_required (VERSION 2.8)
6- project (wsrep-lib)
6+
7+ # Parse version from version header file and store it into
8+ # WSREP_LIB_VERSION.
9+ file (READ "include/wsrep/version.hpp" ver)
10+ string (REGEX MATCH "WSREP_LIB_VERSION_MAJOR ([0-9]*)" _ ${ver} )
11+ set (ver_major ${CMAKE_MATCH_1} )
12+ file (READ "include/wsrep/version.hpp" ver)
13+ string (REGEX MATCH "WSREP_LIB_VERSION_MINOR ([0-9]*)" _ ${ver} )
14+ set (ver_minor ${CMAKE_MATCH_1} )
15+ file (READ "include/wsrep/version.hpp" ver)
16+ string (REGEX MATCH "WSREP_LIB_VERSION_PATCH ([0-9]*)" _ ${ver} )
17+ set (ver_patch ${CMAKE_MATCH_1} )
18+ set (WSREP_LIB_VERSION "${ver_major} .${ver_minor} .${ver_patch} " )
19+ message (STATUS "Wsrep-lib version: ${WSREP_LIB_VERSION} " )
20+
21+ if (CMP0048 EQUAL NEW)
22+ project (wsrep-lib VERSION ${WSREP_LIB_VERSION} )
23+ else ()
24+ project (wsrep-lib)
25+ endif ()
26+
727include (CheckIncludeFile)
828
929# Options
You can’t perform that action at this time.
0 commit comments