Skip to content

Commit

Permalink
faust2sc broaden test for supercollider headers
Browse files Browse the repository at this point in the history
gcc searches for multiple positions of headers given a path
this pr broadens the test for supercollider headers so that the script does not cause a false negative
  • Loading branch information
olafklingt authored and sletz committed Apr 22, 2023
1 parent f375877 commit b040eb4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tools/faust2appls/faust2sc.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,14 @@ def faustoptflags():

# Return the header paths if they exists.
def get_header_paths(headerpath):
folders = [
path.join(headerpath, "include", "plugin_interface"),
path.join(headerpath, "include", "server"),
path.join(headerpath, "include", "common")
]
subfolders = [[], ["include"],["include", "SuperCollider"]]
headerfolders = ["plugin_interface", "server", "common"]
for sf in subfolders:
folders = [path.join(headerpath, *sf, hf) for hf in headerfolders];
if all(path.exists(f) for f in folders):
print("Found SuperCollider headers: %s" % path.join(headerpath, *sf))
return folders

if all(path.exists(folder) for folder in folders):
print("Found SuperCollider headers: %s" % headerpath)
return folders

# Try and find SuperCollider headers on system
def find_headers(headerpath):
Expand Down

0 comments on commit b040eb4

Please sign in to comment.