[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Detect 64 bit library when doing find_library?
From:       David Cole <david.cole () kitware ! com>
Date:       2009-07-10 11:35:12
Message-ID: f435c2c50907100435u7fc9c10btd386a72661d18743 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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
>

[Attachment #5 (text/html)]

Not easily and directly via a cmake property or variable....<div><br></div><div>But \
you could use output from &quot;dumpbin&quot; to analyze the found \
library.<br><br></div><div>&quot;dumpbin /?&quot; from a Visual Studio command prompt \
will get you started.</div> <div><br></div><div>For example, if you do \
a:</div><div>dumpbin /headers mylib.lib</div><div><br></div><div>You should see a \
line in the output like:</div><div><div>  Machine      : 14C \
(x86)</div><div><br></div><div>(for an x86, 32-bit build --- and other text for the \
different 64-bit builds...)</div> \
</div><div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><div \
class="gmail_quote">On Thu, Jul 9, 2009 at 5:27 PM, James Bigler <span \
dir="ltr">&lt;<a href="mailto:jamesbigler@gmail.com">jamesbigler@gmail.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;">Is it possible to detect if find_library has found a 32 \
or 64 bit library on windows?<br><br>Thanks,<br><font color="#888888">James<br>

</font><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a \
href="http://www.kitware.com/opensource/opensource.html" \
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> <br>
Please keep messages on-topic and check the CMake FAQ at: <a \
href="http://www.cmake.org/Wiki/CMake_FAQ" \
target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br> <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" \
target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>




_______________________________________________
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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic