[Cmake] finding matching includes and libraries
Brad King
brad . king at kitware . com
Thu, 15 May 2003 16:44:53 -0400 (EDT)
Hi Fred,
> IF(ZLIB_INCLUDE_DIR)
> FIND_LIBRARY(ZLIB_LIBRARY z
> ${ZLIB_INCLUDE_DIR}/../lib
> )
> ENDIF(ZLIB_INCLUDE_DIR)
>
> I'm not sure about the portability of "${ZLIB_INCLUDE_DIR}/../lib".
> Perhaps there is a better way to strip off the "/include" from
> ZLIB_INCLUDE_DIR in CMake.
This is safe and works well. Several other find modules do this already.
FindZLIB was one of the first modules, and hasn't been updated.
-Brad