[CMake] Detect 64 bit library when doing find_library?

David Cole david.cole at kitware.com
Fri Jul 10 07:35:12 EDT 2009


Not easily and directly via a cmake property or variable....
But you could use output from "dumpbin" to analyze the found library.

"dumpbin /?" from a Visual Studio command prompt will get you started.

For example, if you do a:
dumpbin /headers mylib.lib

You should see a line in the output like:
  Machine      : 14C (x86)

(for an x86, 32-bit build --- and other text for the different 64-bit
builds...)


HTH,
David


On Thu, Jul 9, 2009 at 5:27 PM, James Bigler <jamesbigler at gmail.com> wrote:

> Is it possible to detect if find_library has found a 32 or 64 bit library
> on windows?
>
> Thanks,
> James
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090710/ba31cfb7/attachment.htm>


More information about the CMake mailing list