From Ulrich Hertlein, "on my MacOS X/cmake setup the zlib plugin isn't built by default. This may be because zlib.h is
installed in /opt/local/include on my system (courtesy of DarwinPorts). I've added a CMakeModule to look for zlib.h and the library in various places. The files are attached."
This commit is contained in:
parent
34b4fb524d
commit
0b9feefbda
@ -147,6 +147,7 @@ FIND_PACKAGE(COLLADA)
|
|||||||
FIND_PACKAGE(Xine)
|
FIND_PACKAGE(Xine)
|
||||||
FIND_PACKAGE(OpenVRML)
|
FIND_PACKAGE(OpenVRML)
|
||||||
FIND_PACKAGE(Performer)
|
FIND_PACKAGE(Performer)
|
||||||
|
FIND_PACKAGE(ZLIB)
|
||||||
|
|
||||||
# SET(DESIRED_QT_VERSION 3)
|
# SET(DESIRED_QT_VERSION 3)
|
||||||
# FIND_PACKAGE(Qt)
|
# FIND_PACKAGE(Qt)
|
||||||
|
56
CMakeModules/FindZLIB.cmake
Normal file
56
CMakeModules/FindZLIB.cmake
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Locate gdal
|
||||||
|
# This module defines
|
||||||
|
# ZLIB_LIBRARY
|
||||||
|
# ZLIB_FOUND, if false, do not try to link to gdal
|
||||||
|
# ZLIB_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $ZLIB_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$ZLIB_DIR
|
||||||
|
# used in building gdal.
|
||||||
|
#
|
||||||
|
# Created by Ulrich Hertlein.
|
||||||
|
|
||||||
|
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
||||||
|
$ENV{ZLIB_DIR}/include
|
||||||
|
$ENV{ZLIB_DIR}
|
||||||
|
$ENV{OSGDIR}/include
|
||||||
|
$ENV{OSGDIR}
|
||||||
|
$ENV{OSG_ROOT}/include
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||||
|
/usr/freeware/include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(ZLIB_LIBRARY
|
||||||
|
NAMES z libz
|
||||||
|
PATHS
|
||||||
|
$ENV{ZLIB_DIR}/lib
|
||||||
|
$ENV{ZLIB_DIR}
|
||||||
|
$ENV{OSGDIR}/lib
|
||||||
|
$ENV{OSGDIR}
|
||||||
|
$ENV{OSG_ROOT}/lib
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(ZLIB_FOUND "NO")
|
||||||
|
IF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||||
|
SET(ZLIB_FOUND "YES")
|
||||||
|
ENDIF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user