summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDane Springmeyer <dane@dbsgeo.com>2014-02-03 17:12:12 -0800
committerDane Springmeyer <dane@dbsgeo.com>2014-02-03 17:12:23 -0800
commit630eda9e509613fb58f795007b98d0176524d622 (patch)
tree8a1f4fb25ed63d7b53f31723760e2294e2d7c3b8 /configure
parent463b20d07f9e6b1dc496ef994db079f44f43794e (diff)
downloadqtlocation-mapboxgl-630eda9e509613fb58f795007b98d0176524d622.tar.gz
improve handling of glfw3 and png flags
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 14 insertions, 6 deletions
diff --git a/configure b/configure
index bd64442e76..555177379e 100755
--- a/configure
+++ b/configure
@@ -58,9 +58,13 @@ def configure_llmr(o):
def configure_glfw3(o):
if options.glfw3:
- o['variables']['glfw3_libraries'] = '-L'+os.path.join(options.glfw3,'lib')
- o['variables']['glfw3_libraries'] += '-lglfw3'
- o['variables']['glfw3_cflags'] += '-I'+os.path.join(options.glfw3,'lib')
+ libpath = os.path.join(options.glfw3,'lib')
+ if os.path.exists(libpath):
+ o['variables']['glfw3_libraries'] = '-L'+libpath
+ o['variables']['glfw3_libraries'] += ' -lglfw3'
+ incpath = os.path.join(options.glfw3,'include')
+ if os.path.exists(incpath):
+ o['variables']['glfw3_cflags'] = '-I'+include
else:
ret = pkg_config('glfw3')
if not ret:
@@ -71,9 +75,13 @@ def configure_glfw3(o):
def configure_png(o):
if options.glfw3:
- o['variables']['png_libraries'] = '-L'+os.path.join(options.png,'lib')
- o['variables']['png_libraries'] += '-lpng'
- o['variables']['png_cflags'] += '-I'+os.path.join(options.png,'lib')
+ libpath = os.path.join(options.glfw3,'lib')
+ if os.path.exists(libpath):
+ o['variables']['png_libraries'] = '-L'+libpath
+ o['variables']['png_libraries'] += ' -lpng -lz'
+ incpath = os.path.join(options.glfw3,'include')
+ if os.path.exists(incpath):
+ o['variables']['png_cflags'] = '-I'+include
else:
ret = pkg_config('libpng')
if not ret: