Lightweight cross-platform joystick input library
Revisão | 3c9285b6e7100aae8b67a3bd8b132dd583beb46f (tree) |
---|---|
Hora | 2021-03-24 11:41:31 |
Autor | AlaskanEmily <emily@alas...> |
Commiter | AlaskanEmily |
Detect SConscript files for drivers
@@ -102,8 +102,12 @@ for driver in rejoy_drivers: | ||
102 | 102 | rejoy_libs += rejoy_lib_dict[driver] |
103 | 103 | if driver in rejoy_unix_drivers: |
104 | 104 | use_unix = True |
105 | - rejoy_source += glob.glob(os.path.join(driver, "*.cpp")) | |
106 | - rejoy_source += glob.glob(os.path.join(driver, "*.c")) | |
105 | + # Check if there is a SConscript file to read or not. | |
106 | + if os.path.isfile(os.path.join(driver, "SConscript")): | |
107 | + rejoy_libs.append(SConscript(dirs=[driver], exports=["CC", "environment", "rejoy_build_shared"])) | |
108 | + else: | |
109 | + rejoy_source += glob.glob(os.path.join(driver, "*.cpp")) | |
110 | + rejoy_source += glob.glob(os.path.join(driver, "*.c")) | |
107 | 111 | environment.Append(CPPDEFINES=["REJOY_DRIVER_" + driver.upper() + "=1"]) |
108 | 112 | |
109 | 113 | if use_unix: |