# -*- python -*-
import os
from lsst.sconsUtils import scripts, env, targets

# This is more complicated than an examples SConscript should usually be (most can just use
# BasicSConscript.examples() with no arguments), because we have a source file that's compiled
# into both a C++ program and a SWIG module.

ccList = []
spatialCellSrcList = ["spatialCellExample.cc", "testSpatialCell.cc"]
for path in Glob("#examples/*.cc"):
    base, name = os.path.split(path.abspath)
    if name in spatialCellSrcList:
        continue
    ccList.append(name)

scripts.BasicSConscript.examples(ccList=ccList)

targets["examples"].extend(
    env.Program(spatialCellSrcList, LIBS=env.getLibs("main"))
    )
