[CMake] FindZLIB.cmake

Hendrik Sattler post at hendrik-sattler.de
Mon Oct 1 18:28:12 EDT 2007


Am Montag 01 Oktober 2007 schrieb Kedzierski, Artur CIV NAVSURFWARCENDIV 
CORONA:
> 	Could somebody modify FindZLIB.cmake to search
> "/Program Files/zlib" directory for zlib include and lib directories?
> This is the default location that CPack generated NSIS installer uses.
>
> FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
>     /usr/local/include
>     /usr/include
>     "/Program Files/zlib/include"
> )

Or better
FIND_PATH ( ZLIB_INCLUDE_DIR
  NAMES zlib.h
  PATHS /usr/local /usr ENV ProgramFiles
  PATH_SUFFIXES include zlib/include
)

or you might simply set the environment variables as shown in the respective 
command help. 
Hard coded paths are the root of all evil.

HS


More information about the CMake mailing list