Skip to content

Commit 2ff0188

Browse files
Merge pull request #32 from h3xx/cmake-fix-docs-path
Fix docs install path [Cmake]
2 parents 4602393 + e53df30 commit 2ff0188

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ endif()
1010
#=====================
1111
project(multitail LANGUAGES C)
1212
# set VERSION using version file
13-
file (STRINGS "version" VERSION)
13+
file (STRINGS "version" VERSION_CONTENT)
14+
if(VERSION_CONTENT MATCHES "VERSION=([0-9]+\\.[0-9]+\\.[0-9]+)")
15+
set(VERSION "${CMAKE_MATCH_1}")
16+
message(STATUS "Project version: ${VERSION}")
17+
else()
18+
message(FATAL_ERROR "Unable to extract version from ./version")
19+
endif()
1420
#=====================
1521

1622
# usage:

0 commit comments

Comments
 (0)