mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-11-16 10:05:12 +00:00
cmake: extract lsyncd version from lsyncd.lua
This commit is contained in:
parent
e371078222
commit
7604dd0e16
@ -1,7 +1,13 @@
|
||||
# preamble
|
||||
project( Lsyncd )
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
set( LSYNCD_VERSION 2.3.0 )
|
||||
|
||||
# extract version
|
||||
file(STRINGS "lsyncd.lua" LSYNCD_VERSION_RAW REGEX "lsyncd_version = '.*'")
|
||||
string(REGEX REPLACE "lsyncd_version = \'(.*)\'"
|
||||
"\\1" LSYNCD_VERSION
|
||||
${LSYNCD_VERSION_RAW})
|
||||
|
||||
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/" )
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user