[CMake] Toolchain.cmake causing find_library problems
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Oct 28 19:09:33 EDT 2009
On Wednesday 28 October 2009, Dixon, Shane wrote:
> The error message I get if I don't force the compiler is this:
>
> http://pastebin.com/m185e1316
So "gcc-fm.exe main.c -rdynamic" fails ?
Does "gcc-fm.exe main.c -shared" work ?
> The paths are:
> C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a
> C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h
Ok.
SET( CMAKE_FIND_ROOT_PATH
"C:/Program Files/Eracom/ProtectProcessing Orange SDK"
"C:/Program Files/Eracom/ProtectToolkit C SDK")
and then in the CMakeLists.txt:
FIND_LIBRARY( ERACOM_XXX_LIBFMCRT_LIBRARY fmcrt
PATH_SUFFIXES armfm )
FIND_PATH( ERACOM_PTKC_INCLUDE_DIR cryptoki.h )
should work.
If the library is not found, there is probably still an issue with using the
correct prefixes/suffixes due to using Windows as a host (I don't think too
many people have done this yet with cmake).
> Ah, just in pasting that I see part of the problem. Since I'm
> cross-compiling, I need to point to libfmcrt.a instead of libfmcrt.lib.
Just using "fmcrt" in find_library() should be enough, cmake will add the
necessary prefixes/suffixes itself.
Alex
More information about the CMake
mailing list