[CMake] Toolchain.cmake causing find_library problems
Dixon, Shane
Shane.Dixon at atmel.com
Wed Oct 28 18:27:41 EDT 2009
The error message I get if I don't force the compiler is this:
http://pastebin.com/m185e1316
The paths are:
C:\Program Files\Eracom\ProtectProcessing Orange SDK\lib\armfm\libfmcrt.a
C:\Program Files\Eracom\ProtectToolkit C SDK\include\cryptoki.h
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.
--
Shane Dixon
Linux Engineer
Atmel Corporation
-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Alexander Neundorf
Sent: Wednesday, October 28, 2009 4:08 PM
To: cmake at cmake.org
Subject: Re: [CMake] Toolchain.cmake causing find_library problems
Hi,
On Wednesday 28 October 2009, Dixon, Shane wrote:
> I'm using a toolchain.cmake file (see below). I then try to find a
> library after loading this toolchain (using -DCMAKE_TOOLCHAIN_FILE=...
> Option). I can't find the library regardless of how I set the
> CMAKE_FIND_ROOT_PATH settings. I try setting it to NO and still can't find the library.
>
> It's like it ignores the PATHS when CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
> is set.
>
> I even tried setting CMAKE_PREFIX to the same folder as the path, but
> still no luck. Is there something I'm missing?
>
> In the toolchain.cmake I have:
>
> ............................................................
> INCLUDE( CMakeForceCompiler )
> SET( CMAKE_SYSTEM_NAME Linux )
> CMAKE_FORCE_C_COMPILER( gcc-fm GNU )
> CMAKE_FORCE_CXX_COMPILER( g++-fm GNU )
Why do you use cmake_force_c/cxx_compiler() ?
It shouldn't be necessary.
How does compiler detection fail otherwise ?
> SET( CMAKE_FIND_ROOT_PATH C:/gcc-fm C:/gcc-fm/arm-elf ) SET(
> CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) SET(
> CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) SET(
> CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
> ............................................................
>
> In the top-level CMakeLists.txt I have:
>
> ............................................................
> FIND_LIBRARY( ERACOM_XXX_LIBFMCRT_LIBRARY libfmcrt.lib
> PATHS
> "$ENV{ProgramFiles}/Eracom/ProtectProcessing Orange SDK"
> PATH_SUFFIXES lib/armfm
> NO_CMAKE_FIND_ROOT_PATH )
> ............................................................
What are the full paths to libfmcrt.lib and cryptoki.h on your system ?
Alex
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list