Closed agarny closed 2 years ago
you shouldn't be using ZLIB_ROOT
right? isn't it ZLIB_DIR
? and in general I don't even set it as it is picked up in the config dependencies for libXml2...
Apparently, you can (see here). Different libraries can be found in different ways with CMake (!!). For libxml2
, you can help CMake to find it by passing LIBXML2_INCLUDE_DIR
and LIBXML2_LIBRARY
to it (see here).
The reason I need this is that for libOpenCOR
, I want to use "my" copy of the dependencies.
FTR, I appreciate that one might prefer to use the XxxConfig.cmake
to configure Xxx
, but such a file is not always available (e.g., it's not for the zlib
implementation that I use in libOpenCOR). In fact, even if there was to be such a file, I couldn't use it since I build libCellML
using ExternalProject_Add()
. So, all I can do is to pass it some CMake arguments and this is where ZLIB_ROOT
comes in as being very handy.
If we want to tell CMake where to look for
zlib
, we can passZLIB_ROOT
to it. However, this results in the following CMake warning: