forked from YoutaVen/Vulkan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_master_CMakeLists.py
67 lines (46 loc) · 1.13 KB
/
create_master_CMakeLists.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import os
####################
#
# Credits
#
# Based on code from Prabhu Sundararaj <[email protected]>
#
####################
####################
#
# Functions
#
####################
####################
#
# Main
#
####################
print("Creating master CMakeLists.txt for all projects")
#
outputFile = open("CMakeLists.txt", "w")
#
outputFile.write("cmake_minimum_required(VERSION 3.2)\n")
outputFile.write("\n")
outputFile.write('project("VKTS")\n')
outputFile.write("\n")
allVKTS = os.listdir()
#
for package in allVKTS:
if package.startswith("VKTS_PKG"):
print("Processing '%s'" % (package))
outputFile.write("add_subdirectory(%s)\n" % (package))
outputFile.write("\n")
for package in allVKTS:
if package.startswith("VKTS_Example"):
print("Processing '%s'" % (package))
outputFile.write("add_subdirectory(%s)\n" % (package))
outputFile.write("\n")
for package in allVKTS:
if package.startswith("VKTS_Test"):
print("Processing '%s'" % (package))
outputFile.write("add_subdirectory(%s)\n" % (package))
#
outputFile.close()
#
print("Done.")