<!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>So "gcc-fm.exe main.c -rdynamic" fails ? <BR>
Yes, it fails.<BR>
<BR>
Does "gcc-fm.exe main.c -shared" work ? <BR>
Yes, -shared seems to work.<BR>
<BR>
I'm still having success with FIND_PATH, but FIND_LIBRARY fails:<BR>
<BR>
In toolchain.cmake:<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>
SET( CMAKE_FIND_ROOT_PATH<BR>
"C:/gcc-fm"<BR>
"C:/Program Files/Eracom/ProtectProcessing Orange SDK"<BR>
"C:/Program Files/Eracom/ProtectToolkit C SDK" )<BR>
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 )<BR>
FIND_PATH(ERACOM_PTKC_INCLUDE_DIR cryptoki.h )<BR>
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:<BR>
C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h<BR>
C:\Program Files\Eracom\ProtectProcessing Orange SDK\include\fmerr.h<BR>
C:\Program Files\Eracom\ProtectToolkit C SDK\lib\cryptoki2.lib<BR>
C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: cmake-bounces@cmake.org on behalf of Alexander Neundorf<BR>
Sent: Wed 10/28/2009 5:09 PM<BR>
To: cmake@cmake.org<BR>
Subject: Re: [CMake] Toolchain.cmake causing find_library problems<BR>
<BR>
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">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 www.kitware.com<BR>
<BR>
Visit other Kitware open-source projects at <A HREF="http://www.kitware.com/opensource/opensource.html">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">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">http://www.cmake.org/mailman/listinfo/cmake</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>