File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.0 )
2
- project (ogg LANGUAGES C )
2
+
3
+ # Extract project version from configure.ac
4
+ file (READ configure.ac CONFIGURE_AC_CONTENTS )
5
+ string (REGEX MATCH "AC_INIT\\ (\\ [libogg\\ ],\\ [([0-9]*\\ .[0-9]*\\ .[0-9]*)\\ ]" DUMMY ${CONFIGURE_AC_CONTENTS} )
6
+
7
+ project (ogg VERSION ${CMAKE_MATCH_1} LANGUAGES C )
3
8
4
9
# Required modules
5
10
include (GNUInstallDirs )
@@ -18,14 +23,6 @@ option(INSTALL_DOCS "Install documentation" ON)
18
23
option (INSTALL_PKG_CONFIG_MODULE "Install ogg.pc file" ON )
19
24
option (INSTALL_CMAKE_PACKAGE_MODULE "Install CMake package configuration module" ON )
20
25
21
- # Extract project version from configure.ac
22
- file (READ configure.ac CONFIGURE_AC_CONTENTS )
23
- string (REGEX MATCH "AC_INIT\\ (\\ [libogg\\ ],\\ [([0-9]*).([0-9]*).([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS} )
24
- set (PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1} )
25
- set (PROJECT_VERSION_MINOR ${CMAKE_MATCH_2} )
26
- set (PROJECT_VERSION_PATCH ${CMAKE_MATCH_3} )
27
- set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR} .${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} )
28
-
29
26
# Extract library version from configure.ac
30
27
string (REGEX MATCH "LIB_CURRENT=([0-9]*)" DUMMY ${CONFIGURE_AC_CONTENTS} )
31
28
set (LIB_CURRENT ${CMAKE_MATCH_1} )
You can’t perform that action at this time.
0 commit comments