@@ -990,6 +990,15 @@ def glob_recursive_2(pattern, dirs, node="."):
990
990
results += r
991
991
return results
992
992
993
+ def glob_current_and_custom (pattern , dirs ):
994
+ paths = ["." ]
995
+ if env ["custom_modules" ]:
996
+ paths = paths + env ["custom_modules" ].split ("," )
997
+ results = []
998
+ for p in paths :
999
+ results = results + glob_recursive_2 (pattern , dirs , p )
1000
+ return results
1001
+
993
1002
def get_bool (args , option , default ):
994
1003
from SCons .Variables .BoolVariable import _text2bool
995
1004
@@ -1120,19 +1129,19 @@ def get_dependencies(file, env, exts, headers, sources, others):
1120
1129
headers = []
1121
1130
headers_dirs = []
1122
1131
for ext in extensions ["headers" ]:
1123
- for file in glob_recursive_2 ("*" + ext , headers_dirs ):
1132
+ for file in glob_current_and_custom ("*" + ext , headers_dirs ):
1124
1133
headers .append (str (file ).replace ("/" , "\\ " ))
1125
1134
1126
1135
sources = []
1127
1136
sources_dirs = []
1128
1137
for ext in extensions ["sources" ]:
1129
- for file in glob_recursive_2 ("*" + ext , sources_dirs ):
1138
+ for file in glob_current_and_custom ("*" + ext , sources_dirs ):
1130
1139
sources .append (str (file ).replace ("/" , "\\ " ))
1131
1140
1132
1141
others = []
1133
1142
others_dirs = []
1134
1143
for ext in extensions ["others" ]:
1135
- for file in glob_recursive_2 ("*" + ext , others_dirs ):
1144
+ for file in glob_current_and_custom ("*" + ext , others_dirs ):
1136
1145
others .append (str (file ).replace ("/" , "\\ " ))
1137
1146
1138
1147
skip_filters = False
@@ -1214,7 +1223,7 @@ def get_dependencies(file, env, exts, headers, sources, others):
1214
1223
set_sources = set (sources_active )
1215
1224
set_others = set (others_active )
1216
1225
for file in headers :
1217
- base_path = os .path .dirname (file ).replace ("\\ " , "_" )
1226
+ base_path = os .path .dirname (file ).replace ("\\ " , "_" ). replace ( ":" , "" )
1218
1227
all_items .append (f'<ClInclude Include="{ file } ">' )
1219
1228
all_items .append (
1220
1229
f" <ExcludedFromBuild Condition=\" !$(ActiveProjectItemList_{ base_path } .Contains(';{ file } ;'))\" >true</ExcludedFromBuild>"
@@ -1224,7 +1233,7 @@ def get_dependencies(file, env, exts, headers, sources, others):
1224
1233
activeItems .append (file )
1225
1234
1226
1235
for file in sources :
1227
- base_path = os .path .dirname (file ).replace ("\\ " , "_" )
1236
+ base_path = os .path .dirname (file ).replace ("\\ " , "_" ). replace ( ":" , "" )
1228
1237
all_items .append (f'<ClCompile Include="{ file } ">' )
1229
1238
all_items .append (
1230
1239
f" <ExcludedFromBuild Condition=\" !$(ActiveProjectItemList_{ base_path } .Contains(';{ file } ;'))\" >true</ExcludedFromBuild>"
@@ -1234,7 +1243,7 @@ def get_dependencies(file, env, exts, headers, sources, others):
1234
1243
activeItems .append (file )
1235
1244
1236
1245
for file in others :
1237
- base_path = os .path .dirname (file ).replace ("\\ " , "_" )
1246
+ base_path = os .path .dirname (file ).replace ("\\ " , "_" ). replace ( ":" , "" )
1238
1247
all_items .append (f'<None Include="{ file } ">' )
1239
1248
all_items .append (
1240
1249
f" <ExcludedFromBuild Condition=\" !$(ActiveProjectItemList_{ base_path } .Contains(';{ file } ;'))\" >true</ExcludedFromBuild>"
@@ -1253,7 +1262,7 @@ def get_dependencies(file, env, exts, headers, sources, others):
1253
1262
condition = "'$(GodotConfiguration)|$(GodotPlatform)'=='" + vsconf + "'"
1254
1263
itemlist = {}
1255
1264
for item in activeItems :
1256
- key = os .path .dirname (item ).replace ("\\ " , "_" )
1265
+ key = os .path .dirname (item ).replace ("\\ " , "_" ). replace ( ":" , "" )
1257
1266
if key not in itemlist :
1258
1267
itemlist [key ] = [item ]
1259
1268
else :
0 commit comments