summaryrefslogtreecommitdiff
path: root/graphics/goxel/files/patch-SConstruct
blob: 4c6f80575996f4ab7341d0b7732c494e9065c0af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- SConstruct.orig	2022-08-16 08:30:35 UTC
+++ SConstruct
@@ -70,7 +66,7 @@ if env['mode'] not in ['debug', 'analyze']:
     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'])
@@ -88,16 +84,14 @@ 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'])
     # Note: add '--static' to link with all the libs needed by glfw3.
     env.ParseConfig('pkg-config --libs glfw3')
     env.ParseConfig('pkg-config --cflags --libs gtk+-3.0')
+    env.ParseConfig('pkg-config --libs libpng')
 
 # Windows compilation support.
 if target_os == 'msys':