<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [CMake] Toolchain.cmake causing find_library problems</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>No, that doesn't work either. :(<BR>
<BR>
-Shane<BR>
<BR>
-----Original Message-----<BR>
From: David Cole [<A HREF="mailto:david.cole@kitware.com">mailto:david.cole@kitware.com</A>]<BR>
Sent: Thu 10/29/2009 11:08 AM<BR>
To: Dixon, Shane<BR>
Cc: a.neundorf-work@gmx.net; cmake@cmake.org<BR>
Subject: Re: [CMake] Toolchain.cmake causing find_library problems<BR>
<BR>
How about FIND_LIBRARY with &quot;fmcrt&quot; instead of &quot;libfmcrt&quot; ... ?<BR>
<BR>
<BR>
On Thu, Oct 29, 2009 at 12:46 PM, Dixon, Shane &lt;Shane.Dixon@atmel.com&gt;wrote:<BR>
<BR>
&gt;&nbsp; So &quot;gcc-fm.exe main.c -rdynamic&quot;&nbsp; fails ?<BR>
&gt; Yes, it fails.<BR>
&gt;<BR>
&gt;<BR>
&gt; Does &quot;gcc-fm.exe main.c -shared&quot;&nbsp; work ?<BR>
&gt; Yes, -shared seems to work.<BR>
&gt;<BR>
&gt; I'm still having success with FIND_PATH, but FIND_LIBRARY fails:<BR>
&gt;<BR>
&gt; In toolchain.cmake:<BR>
&gt;<BR>
&gt; INCLUDE( CMakeForceCompiler )<BR>
&gt; SET( CMAKE_SYSTEM_NAME Linux )<BR>
&gt; CMAKE_FORCE_C_COMPILER( gcc-fm GNU )<BR>
&gt; CMAKE_FORCE_CXX_COMPILER( g++-fm GNU )<BR>
&gt; SET( CMAKE_FIND_ROOT_PATH<BR>
&gt;&nbsp;&nbsp; &quot;C:/gcc-fm&quot;<BR>
&gt;<BR>
&gt;&nbsp;&nbsp; &quot;C:/Program Files/Eracom/ProtectProcessing Orange SDK&quot;<BR>
&gt;&nbsp;&nbsp; &quot;C:/Program Files/Eracom/ProtectToolkit C SDK&quot; )<BR>
&gt; SET( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )<BR>
&gt; SET( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )<BR>
&gt; SET( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )<BR>
&gt;<BR>
&gt; In CMakeLists.txt<BR>
&gt; FIND_PATH( ERACOM_PPO_INCLUDE_DIR fmerr.h )<BR>
&gt;<BR>
&gt; FIND_PATH(ERACOM_PTKC_INCLUDE_DIR cryptoki.h )<BR>
&gt; FIND_LIBRARY( ERACOM_XXX_LIBFMCRT_LIBRARY libfmcrt<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PATH_SUFFIXES armfm )<BR>
&gt; FIND_LIBRARY( ERACOM_XXX_CRYPTOKI2_LIBRARY cryptoki2 )<BR>
&gt;<BR>
&gt; Both the FIND_PATH's pass and both FIND_LIBRARY's fail again.&nbsp; I thought<BR>
&gt; maybe it's because the paths have a space so I moved them to a folder that<BR>
&gt; has no spaces and still the same issue.<BR>
&gt;<BR>
&gt; Here are all the paths:<BR>
&gt;<BR>
&gt; C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h<BR>
&gt; C:\Program Files\Eracom\ProtectProcessing Orange SDK\include\fmerr.h<BR>
&gt; C:\Program Files\Eracom\ProtectToolkit C SDK\lib\cryptoki2.lib<BR>
&gt;<BR>
&gt; C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a<BR>
&gt;<BR>
&gt;<BR>
&gt; -----Original Message-----<BR>
&gt; From: cmake-bounces@cmake.org on behalf of Alexander Neundorf<BR>
&gt; Sent: Wed 10/28/2009 5:09 PM<BR>
&gt; To: cmake@cmake.org<BR>
&gt; Subject: Re: [CMake] Toolchain.cmake causing find_library problems<BR>
&gt;<BR>
&gt; On Wednesday 28 October 2009, Dixon, Shane wrote:<BR>
&gt; &gt; The error message I get if I don't force the compiler is this:<BR>
&gt; &gt;<BR>
&gt; &gt; <A HREF="http://pastebin.com/m185e1316">http://pastebin.com/m185e1316</A><BR>
&gt;<BR>
&gt; So &quot;gcc-fm.exe main.c -rdynamic&quot;&nbsp; fails ?<BR>
&gt; Does &quot;gcc-fm.exe main.c -shared&quot;&nbsp; work ?<BR>
&gt;<BR>
&gt;<BR>
&gt; &gt; The paths are:<BR>
&gt; &gt; C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a<BR>
&gt; &gt; C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h<BR>
&gt;<BR>
&gt; Ok.<BR>
&gt; SET( CMAKE_FIND_ROOT_PATH<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;C:/Program Files/Eracom/ProtectProcessing Orange SDK&quot;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;C:/Program Files/Eracom/ProtectToolkit C SDK&quot;)<BR>
&gt;<BR>
&gt; and then in the CMakeLists.txt:<BR>
&gt;<BR>
&gt; FIND_LIBRARY( ERACOM_XXX_LIBFMCRT_LIBRARY fmcrt<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PATH_SUFFIXES armfm )<BR>
&gt;<BR>
&gt; FIND_PATH( ERACOM_PTKC_INCLUDE_DIR cryptoki.h )<BR>
&gt;<BR>
&gt; should work.<BR>
&gt; If the library is not found, there is probably still an issue with using<BR>
&gt; the<BR>
&gt; correct prefixes/suffixes due to using Windows as a host (I don't think too<BR>
&gt; many people have done this yet with cmake).<BR>
&gt;<BR>
&gt; &gt; Ah, just in pasting that I see part of the problem.&nbsp; Since I'm<BR>
&gt; &gt; cross-compiling, I need to point to libfmcrt.a instead of libfmcrt.lib.<BR>
&gt;<BR>
&gt; Just using &quot;fmcrt&quot; in find_library() should be enough, cmake will add the<BR>
&gt; necessary prefixes/suffixes itself.<BR>
&gt;<BR>
&gt; Alex<BR>
&gt; _______________________________________________<BR>
&gt; Powered by www.kitware.com<BR>
&gt;<BR>
&gt; Visit other Kitware open-source projects at<BR>
&gt; <A HREF="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>
&gt;<BR>
&gt; Please keep messages on-topic and check the CMake FAQ at:<BR>
&gt; <A HREF="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</A><BR>
&gt;<BR>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <A HREF="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</A><BR>
&gt;<BR>
&gt;<BR>
&gt; _______________________________________________<BR>
&gt; Powered by www.kitware.com<BR>
&gt;<BR>
&gt; Visit other Kitware open-source projects at<BR>
&gt; <A HREF="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>
&gt;<BR>
&gt; Please keep messages on-topic and check the CMake FAQ at:<BR>
&gt; <A HREF="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</A><BR>
&gt;<BR>
&gt; Follow this link to subscribe/unsubscribe:<BR>
&gt; <A HREF="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</A><BR>
&gt;<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>