summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorBrian Van Essen <vanessen1@llnl.gov>2017-08-09 13:40:10 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2017-08-09 15:40:10 -0500
commit28b0421eb13ddc40033b54b63f1dfa2966257384 (patch)
tree3074da11a8f9072bad83b7a8ee87fb6ac135a355 /var
parent0137f17306abd4d3969cee6db1fce8290674a1ff (diff)
downloadspack-28b0421eb13ddc40033b54b63f1dfa2966257384.tar.gz
spack-28b0421eb13ddc40033b54b63f1dfa2966257384.tar.bz2
spack-28b0421eb13ddc40033b54b63f1dfa2966257384.tar.xz
spack-28b0421eb13ddc40033b54b63f1dfa2966257384.zip
Opencv fix (#5040)
* Added a package for the MDAnalysis toolkit. * Changed cmake_options to args to be consistent with the rest of the file and fix a cmake error about undefined errors. Additionally, added guards for both png and zlib to not include their cmake options when those variants are not specified.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/opencv/package.py42
1 files changed, 22 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/opencv/package.py b/var/spack/repos/builtin/packages/opencv/package.py
index f2bda99a01..5e5be0abe8 100644
--- a/var/spack/repos/builtin/packages/opencv/package.py
+++ b/var/spack/repos/builtin/packages/opencv/package.py
@@ -128,27 +128,29 @@ class Opencv(CMakePackage):
]
# Media I/O
- zlib = spec['zlib']
- args.extend([
- '-DZLIB_LIBRARY_{0}:FILEPATH={1}'.format((
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
- join_path(zlib.prefix.lib,
- 'libz.{0}'.format(dso_suffix))),
- '-DZLIB_INCLUDE_DIR:PATH={0}'.format(zlib.prefix.include)
- ])
-
- libpng = spec['libpng']
- args.extend([
- '-DPNG_LIBRARY_{0}:FILEPATH={1}'.format((
- 'DEBUG' if '+debug' in spec else 'RELEASE'),
- join_path(libpng.prefix.lib,
- 'libpng.{0}'.format(dso_suffix))),
- '-DPNG_INCLUDE_DIR:PATH={0}'.format(libpng.prefix.include)
- ])
+ if '+zlib' in spec:
+ zlib = spec['zlib']
+ args.extend([
+ '-DZLIB_LIBRARY_{0}:FILEPATH={1}'.format((
+ 'DEBUG' if '+debug' in spec else 'RELEASE'),
+ join_path(zlib.prefix.lib,
+ 'libz.{0}'.format(dso_suffix))),
+ '-DZLIB_INCLUDE_DIR:PATH={0}'.format(zlib.prefix.include)
+ ])
+
+ if '+png' in spec:
+ libpng = spec['libpng']
+ args.extend([
+ '-DPNG_LIBRARY_{0}:FILEPATH={1}'.format((
+ 'DEBUG' if '+debug' in spec else 'RELEASE'),
+ join_path(libpng.prefix.lib,
+ 'libpng.{0}'.format(dso_suffix))),
+ '-DPNG_INCLUDE_DIR:PATH={0}'.format(libpng.prefix.include)
+ ])
if '+jpeg' in spec:
libjpeg = spec['libjpeg-turbo']
- cmake_options.extend([
+ args.extend([
'-DBUILD_JPEG:BOOL=OFF',
'-DJPEG_LIBRARY:FILEPATH={0}'.format(
join_path(libjpeg.prefix.lib,
@@ -158,7 +160,7 @@ class Opencv(CMakePackage):
if '+tiff' in spec:
libtiff = spec['libtiff']
- cmake_options.extend([
+ args.extend([
'-DTIFF_LIBRARY_{0}:FILEPATH={1}'.format((
'DEBUG' if '+debug' in spec else 'RELEASE'),
join_path(libtiff.prefix.lib,
@@ -168,7 +170,7 @@ class Opencv(CMakePackage):
if '+jasper' in spec:
jasper = spec['jasper']
- cmake_options.extend([
+ args.extend([
'-DJASPER_LIBRARY_{0}:FILEPATH={1}'.format((
'DEBUG' if '+debug' in spec else 'RELEASE'),
join_path(jasper.prefix.lib,