Re: [CMake] How to deal with pre built 3rd party libs?

2012-05-15 Thread John Drescher
> I have a project that depends on 3rd party dll's (libxml2).
>
> Is there a 'best practice' to deal with associated files, .h, .lib .dll of
> such within a CMake project?
>
> My library needs to link to the 3rd party lib, and needs its dll for
> execution (obviously), so I feel the need for copying this DLL to my libs
> 'install/bin' folder, so that any of my executables can run, without getting
> a '...dll not found'.
>
>

I wrote cmake macros to generate a batch file containing cmake -e
commands to copy the dlls to each configuration. This I run as a
target in my projects.

John
--

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


Re: [CMake] How to deal with pre built 3rd party libs?

2012-05-15 Thread Leif Walsh
Look at things involving the IMPORTED property of add_library. You probably 
want to check the headers in to your repo. Or use or create a 
FindLibXml2.cmake. 

Or if you are compiling libxml2 as part of your build process, look at the 
ExternalProject module. 

Sent from my iPhone

On May 15, 2012, at 17:18, John Drescher  wrote:

>> I have a project that depends on 3rd party dll's (libxml2).
>> 
>> Is there a 'best practice' to deal with associated files, .h, .lib .dll of
>> such within a CMake project?
>> 
>> My library needs to link to the 3rd party lib, and needs its dll for
>> execution (obviously), so I feel the need for copying this DLL to my libs
>> 'install/bin' folder, so that any of my executables can run, without getting
>> a '...dll not found'.
>> 
>> 
> 
> I wrote cmake macros to generate a batch file containing cmake -e
> commands to copy the dlls to each configuration. This I run as a
> target in my projects.
> 
> John
> --
> 
> 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
--

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


Re: [CMake] How to deal with pre built 3rd party libs?

2012-05-15 Thread Andreas Pakulat
Hi,

On Tue, May 15, 2012 at 10:39 PM, Totte Karlsson
wrote:

> Hi,
> I have a project that depends on 3rd party dll's (libxml2).
>
> Is there a 'best practice' to deal with associated files, .h, .lib .dll of
> such within a CMake project?
>
> My library needs to link to the 3rd party lib, and needs its dll for
> execution (obviously), so I feel the need for copying this DLL to my libs
> 'install/bin' folder, so that any of my executables can run, without
> getting a '...dll not found'.
>

For bundling of 3rd party stuff, you should look at the BundleUtilities
module. Unlike what it name might suggest it works cross-platform,
providing a suite of utility functions to assemble a standalone directory
for your application and all its dependencies.

Andreas
--

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

Re: [CMake] How to deal with pre built 3rd party libs?

2012-05-16 Thread Totte Karlsson

Great,
I believe the External Project is what I need..

Thanks!
totte

On 5/15/2012 2:43 PM, Leif Walsh wrote:

Look at things involving the IMPORTED property of add_library. You probably 
want to check the headers in to your repo. Or use or create a FindLibXml2.cmake.

Or if you are compiling libxml2 as part of your build process, look at the 
ExternalProject module.

Sent from my iPhone

On May 15, 2012, at 17:18, John Drescher  wrote:


I have a project that depends on 3rd party dll's (libxml2).

Is there a 'best practice' to deal with associated files, .h, .lib .dll of
such within a CMake project?

My library needs to link to the 3rd party lib, and needs its dll for
execution (obviously), so I feel the need for copying this DLL to my libs
'install/bin' folder, so that any of my executables can run, without getting
a '...dll not found'.




I wrote cmake macros to generate a batch file containing cmake -e
commands to copy the dlls to each configuration. This I run as a
target in my projects.

John
--

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

--

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