#Sconscript for FCProcessImages in FColladaTools.
#by Veronique Laforte and Alfred Leung, Aug. 27th 2007

#Create the Environment which creates the compile and linker command lines.
env = Environment()
ifdebug = ARGUMENTS.get('debug', 0)

#Add the compiler and linker flags and include search path
env.Append(CPPPATH = ['../../../../../FCollada', '/usr/local/include'])

#Add the macros defined for all the builds
env.Append(CPPDEFINES = ['LINUX'])

#Add the macros and flags defined only for DEBUG, or RELEASE
if int(ifdebug):
    env.Append(CPPDEFINES = ['_DEBUG'])
    env.Append(CCFLAGS = ['-O0', '-g'])
else:
    env.Append(CPPDEFINES = ['NDEBUG'])
    env.Append(CCFLAGS = ['-O2'])


#List of the source code to compile, and make a library out of it
if int(ifdebug):
    libs = Split("""FColladaSUD
		    dl IL ILU""")

else:
    libs = Split("""FColladaSUR
                    dl IL ILU""")

list = Split("""FCProcessImages.cpp""")

#For LINUX only, the list of paths where to look for the libraries
#   to link with.
path = Split("""../../../../../FCollada/Output
				/usr/local/lib""")

if int(ifdebug):
    FCProcessImages = env.Program('FCProcessImagesD', list, LIBS=libs, LIBPATH=path)
else:
    FCProcessImages = env.Program('FCProcessImagesR', list, LIBS=libs, LIBPATH=path)

#Specifying the name and directory of output library
env.Install('../../', FCProcessImages)

