platformio_pre.py fix for new cmake macros
This commit is contained in:
@@ -65,10 +65,10 @@ version_h = '''
|
|||||||
|
|
||||||
with open('CMakeLists.txt') as cm:
|
with open('CMakeLists.txt') as cm:
|
||||||
str = cm.read()
|
str = cm.read()
|
||||||
v_major = re.findall(r'pip_MAJOR\s+(\d+)\)', str)
|
v_major = re.findall(r'PIP_MAJOR\s+(\d+)\)', str)
|
||||||
v_minor = re.findall(r'pip_MINOR\s+(\d+)\)', str)
|
v_minor = re.findall(r'PIP_MINOR\s+(\d+)\)', str)
|
||||||
v_rev = re.findall(r'pip_REVISION\s+(\d+)\)', str)
|
v_rev = re.findall(r'PIP_REVISION\s+(\d+)\)', str)
|
||||||
v_suffix = re.findall(r'pip_SUFFIX\s+(\w+)\)', str)
|
v_suffix = re.findall(r'PIP_SUFFIX\s+(\w+)\)', str)
|
||||||
ver = ''
|
ver = ''
|
||||||
ver = v_major[0]+'.'+v_minor[0]+'.'+v_rev[0]
|
ver = v_major[0]+'.'+v_minor[0]+'.'+v_rev[0]
|
||||||
version_h.replace('${VERSION_MAJOR}', v_major[0])
|
version_h.replace('${VERSION_MAJOR}', v_major[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user