[CMake] How to find the DLL's a a required package searched with FIND_PACKAGE()?

Ryan Pavlik rpavlik at iastate.edu
Wed Feb 10 18:23:03 EST 2010


Well, it would be good to improve all the applicable find modules to provide
LIBXML2_RUNTIME_LIBRARY and LIBXML2_RUNTIME_LIBRARY_DIRS, as mentioned in
the readme.txt in the modules folder.  This is what I am doing with my own
modules - you might consider copying the FindLibXML2.cmake file to your
project's module directory and making improvements to support this.

Ryan

On Wed, Feb 10, 2010 at 4:41 PM, Gabriel Petrovay <
gabriel.petrovay at 28msec.com> wrote:

> Hi,
>
> We are using CMake 2.6. For Windows we need the DLL's of the required
> libraries for two reasons given below.
>
> Take for example LibXml.dll which is required by our project in order to
> run on Windows. One can build and link our project successfully because the
> FindLibXml2.cmake provides:
> #  LIBXML2_INCLUDE_DIR - The LibXml2 include directory
> #  LIBXML2_LIBRARIES - The libraries needed to use LibXml2
>
> But we also need a reference to the LibXml2.dll file for the following 2
> reasons.
>
> 1. When you "make" the "install" target (e.g. "nmake install"), the dll of
> the required library has to go into the "bin" directory, as well where our
> executable.
> 2. We also need to set the PATH environment variable in order to execute
> our own executable (during the build, a bootstrap executable). So we need it
> in a scenario like:
> SET(ENV{PATH} ${LIBXML2_DLL})
>
> So, do you know a way to:
> - install the DLLs belonging to a required library;
> - reference the DLLs belonging to a required library during the build.
>
> I would expect that the FindLibXml2.cmake module would also provide a
> LIBXML2_DLL variable on Windows platforms.
>
> Thanks!
>
> Gabriel
>
> --
> MSc Gabriel Petrovay
> Mobile: +41(0)787978034
> www.28msec.com
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100210/3b494fa2/attachment-0001.htm>


More information about the CMake mailing list