forked from AEnguerrand/cpp_zia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.py
40 lines (27 loc) · 906 Bytes
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import shutil
import os
import sys
import subprocess
print ("---------- Go to Directory -----\n")
os.chdir(os.path.expanduser("./build"))
print ("\n---------- Cmake ----------\n")
cmakeCmd = ['cmake', ".."]
if sys.platform.startswith('win'):
shell = True
else:
shell = False
retCode = subprocess.check_call(cmakeCmd, stderr=subprocess.STDOUT, shell=shell)
print ("\n---------- Build ----------\n")
cmakeCmd = ['cmake', "--build", "."]
if sys.platform.startswith('win'):
shell = True
else:
shell = False
retCode = subprocess.check_call(cmakeCmd, stderr=subprocess.STDOUT, shell=shell)
print ("\n---------- Move dll into Build/Modules folder ----------\n")
source = os.listdir("../Modules/")
if not os.path.exists("./Modules"):
os.makedirs("./Modules")
for files in source:
shutil.copy2("../Modules/" + files, "./Modules/" + files )
print ("\n---------- Finish ----------\n")