How about FIND_LIBRARY with "fmcrt" instead of "libfmcrt" ... ?<br><br><div><br><div class="gmail_quote">On Thu, Oct 29, 2009 at 12:46 PM, Dixon, Shane <span dir="ltr"><<a href="mailto:Shane.Dixon@atmel.com">Shane.Dixon@atmel.com</a>></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 "gcc-fm.exe main.c -rdynamic" fails ? <br></div>
Yes, it fails.<div class="im"><br>
<br>
Does "gcc-fm.exe main.c -shared" work ? <br></div>
Yes, -shared seems to work.<br>
<br>
I'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>
"C:/gcc-fm"<div class="im"><br>
"C:/Program Files/Eracom/ProtectProcessing Orange SDK"<br>
"C:/Program Files/Eracom/ProtectToolkit C SDK" )<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's pass and both FIND_LIBRARY's fail again. I thought maybe it'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>
> The error message I get if I don't force the compiler is this:<br>
><br>
> <a href="http://pastebin.com/m185e1316" target="_blank">http://pastebin.com/m185e1316</a><br>
<br>
So "gcc-fm.exe main.c -rdynamic" fails ?<br>
Does "gcc-fm.exe main.c -shared" work ?<br>
<br>
<br>
> The paths are:<br>
> C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a<br>
> C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h<br>
<br>
Ok.<br>
SET( CMAKE_FIND_ROOT_PATH<br>
"C:/Program Files/Eracom/ProtectProcessing Orange SDK"<br>
"C:/Program Files/Eracom/ProtectToolkit C SDK")<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't think too<br>
many people have done this yet with cmake).<br>
<br>
> Ah, just in pasting that I see part of the problem. Since I'm<br>
> cross-compiling, I need to point to libfmcrt.a instead of libfmcrt.lib.<br>
<br>
Just using "fmcrt" 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>