[Cmake] finding matching includes and libraries
Brad King
brad.king at kitware.com
Thu May 15 16:44:53 EDT 2003
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
More information about the CMake
mailing list