--- SConstruct.orig 2024-02-02 13:19:31 UTC +++ SConstruct @@ -66,7 +66,7 @@ if env['werror']: env.Append(CCFLAGS='-Werror') if env['mode'] not in ['debug', 'analyze']: - env.Append(CPPDEFINES='NDEBUG', CCFLAGS='-Ofast') + env.Append(CPPDEFINES='NDEBUG') if env['mode'] == 'debug': env.Append(CCFLAGS=['-O0']) @@ -84,15 +84,13 @@ for root, dirnames, filenames in os.walk('src'): if filename.endswith('.c') or filename.endswith('.cpp'): sources.append(os.path.join(root, filename)) -# Check for libpng. -if conf.CheckLibWithHeader('libpng', 'png.h', 'c'): - env.Append(CPPDEFINES='HAVE_LIBPNG=1') - # Linux compilation support. if target_os == 'posix': + env.Append(CPPDEFINES='HAVE_LIBPNG=1') env.Append(LIBS=['GL', 'm', 'dl', 'pthread']) # Note: add '--static' to link with all the libs needed by glfw3. - env.ParseConfig('pkg-config --libs glfw3') + env.ParseConfig('pkg-config --cflags --libs glfw3') + env.ParseConfig('pkg-config --libs libpng') # Windows compilation support. if target_os == 'msys':