How about FIND_LIBRARY with &quot;fmcrt&quot; instead of &quot;libfmcrt&quot; ... ?<br><br><div><br><div class="gmail_quote">On Thu, Oct 29, 2009 at 12:46 PM, Dixon, Shane <span dir="ltr">&lt;<a href="mailto:Shane.Dixon@atmel.com">Shane.Dixon@atmel.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div>


<p><font size="2"><div class="im">So &quot;gcc-fm.exe main.c -rdynamic&quot;  fails ? <br></div>
Yes, it fails.<div class="im"><br>
<br>
Does &quot;gcc-fm.exe main.c -shared&quot;  work ? <br></div>
Yes, -shared seems to work.<br>
<br>
I&#39;m still having success with FIND_PATH, but FIND_LIBRARY fails:<br>
<br>
In toolchain.cmake:<div class="im"><br>
INCLUDE( CMakeForceCompiler )<br>
SET( CMAKE_SYSTEM_NAME Linux )<br>
CMAKE_FORCE_C_COMPILER( gcc-fm GNU )<br>
CMAKE_FORCE_CXX_COMPILER( g++-fm GNU )<br></div><div class="im">
SET( CMAKE_FIND_ROOT_PATH<br></div>
  &quot;C:/gcc-fm&quot;<div class="im"><br>
  &quot;C:/Program Files/Eracom/ProtectProcessing Orange SDK&quot;<br>
  &quot;C:/Program Files/Eracom/ProtectToolkit C SDK&quot; )<br></div>
SET( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )<br>
SET( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )<br>
SET( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )<br>
<br>
In CMakeLists.txt<br>
FIND_PATH( ERACOM_PPO_INCLUDE_DIR fmerr.h )<div class="im"><br>
FIND_PATH(ERACOM_PTKC_INCLUDE_DIR cryptoki.h )<br></div>
FIND_LIBRARY( ERACOM_XXX_LIBFMCRT_LIBRARY libfmcrt<br>
                  PATH_SUFFIXES armfm )<br>
FIND_LIBRARY( ERACOM_XXX_CRYPTOKI2_LIBRARY cryptoki2 )<br>
<br>
Both the FIND_PATH&#39;s pass and both FIND_LIBRARY&#39;s fail again.  I thought maybe it&#39;s because the paths have a space so I moved them to a folder that has no spaces and still the same issue.<br>
<br>
Here are all the paths:<div class="im"><br>
C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h<br></div>
C:\Program Files\Eracom\ProtectProcessing Orange SDK\include\fmerr.h<br>
C:\Program Files\Eracom\ProtectToolkit C SDK\lib\cryptoki2.lib<div class="im"><br>
C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a<br>
<br>
<br></div><div class="im">
-----Original Message-----<br>
From: <a href="mailto:cmake-bounces@cmake.org" target="_blank">cmake-bounces@cmake.org</a> on behalf of Alexander Neundorf<br>
Sent: Wed 10/28/2009 5:09 PM<br>
To: <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a><br>
Subject: Re: [CMake] Toolchain.cmake causing find_library problems<br>
<br></div><div><div></div><div class="h5">
On Wednesday 28 October 2009, Dixon, Shane wrote:<br>
&gt; The error message I get if I don&#39;t force the compiler is this:<br>
&gt;<br>
&gt; <a href="http://pastebin.com/m185e1316" target="_blank">http://pastebin.com/m185e1316</a><br>
<br>
So &quot;gcc-fm.exe main.c -rdynamic&quot;  fails ?<br>
Does &quot;gcc-fm.exe main.c -shared&quot;  work ?<br>
<br>
<br>
&gt; The paths are:<br>
&gt; C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a<br>
&gt; C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h<br>
<br>
Ok.<br>
SET( CMAKE_FIND_ROOT_PATH<br>
     &quot;C:/Program Files/Eracom/ProtectProcessing Orange SDK&quot;<br>
      &quot;C:/Program Files/Eracom/ProtectToolkit C SDK&quot;)<br>
<br>
and then in the CMakeLists.txt:<br>
<br>
FIND_LIBRARY( ERACOM_XXX_LIBFMCRT_LIBRARY fmcrt<br>
              PATH_SUFFIXES armfm )<br>
<br>
FIND_PATH( ERACOM_PTKC_INCLUDE_DIR cryptoki.h )<br>
<br>
should work.<br>
If the library is not found, there is probably still an issue with using the<br>
correct prefixes/suffixes due to using Windows as a host (I don&#39;t think too<br>
many people have done this yet with cmake).<br>
<br>
&gt; Ah, just in pasting that I see part of the problem.  Since I&#39;m<br>
&gt; cross-compiling, I need to point to libfmcrt.a instead of libfmcrt.lib.<br>
<br>
Just using &quot;fmcrt&quot; in find_library() should be enough, cmake will add the<br>
necessary prefixes/suffixes itself.<br>
<br>
Alex<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>
<br>
</div></div></font>
</p>

</div>
<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>