summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorDane Springmeyer <dane@dbsgeo.com>2014-02-03 17:31:33 -0800
committerDane Springmeyer <dane@dbsgeo.com>2014-02-03 17:31:33 -0800
commit8b4b91f6cc272c001c2a2cd956a28d2b8b619b26 (patch)
treee139d318ad6f5c95f109d672bbfd811e19f89237 /configure
parent23b3e99849cfb24e6f6ffd2ae8593de3fe230b4c (diff)
downloadqtlocation-mapboxgl-8b4b91f6cc272c001c2a2cd956a28d2b8b619b26.tar.gz
first pass at universal libpng for iOS
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure40
1 files changed, 29 insertions, 11 deletions
diff --git a/configure b/configure
index 7e7df519f2..434a39e80c 100755
--- a/configure
+++ b/configure
@@ -34,6 +34,16 @@ parser.add_option("--png",
dest="png",
help="Path to png (defaults to using pkg-config)")
+parser.add_option("--png-includes",
+ action="store",
+ dest="png_includes",
+ help="Path to png includes")
+
+parser.add_option("--png-libpath",
+ action="store",
+ dest="png_libpath",
+ help="Path to png libs")
+
(options, args) = parser.parse_args()
def pkg_config(pkg):
@@ -60,11 +70,11 @@ def configure_glfw3(o):
if options.glfw3:
libpath = os.path.join(options.glfw3,'lib')
if os.path.exists(libpath):
- o['variables']['glfw3_libraries'] = '-L'+libpath
- o['variables']['glfw3_libraries'] += ' -lglfw3'
+ 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
+ o['variables']['glfw3_cflags'] = ['-I'+incpath]
else:
ret = pkg_config('glfw3')
if not ret:
@@ -74,14 +84,22 @@ def configure_glfw3(o):
o['variables']['glfw3_cflags'] = ret[1].split()
def configure_png(o):
- if options.png:
- libpath = os.path.join(options.png,'lib')
- if os.path.exists(libpath):
- o['variables']['png_libraries'] = '-L'+libpath
- o['variables']['png_libraries'] += ' -lpng -lz'
- incpath = os.path.join(options.png,'include')
- if os.path.exists(incpath):
- o['variables']['png_cflags'] = '-I'+include
+ if options.png or options.png_libpath or options.png_includes:
+ libpath = None
+ if options.png_libpath:
+ libpath = options.png_libpath
+ elif options.png:
+ libpath = os.path.join(options.png,'lib')
+ if libpath and os.path.exists(libpath):
+ o['variables']['png_libraries'] = ['-L'+libpath]
+ o['variables']['png_libraries'] += ['-lpng','-lz']
+ incpath = None
+ if options.png_includes:
+ incpath = options.png_includes
+ elif options.png:
+ incpath = os.path.join(options.png,'include')
+ if incpath and os.path.exists(incpath):
+ o['variables']['png_cflags'] = '-I'+incpath
else:
ret = pkg_config('libpng')
if not ret: