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 )
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 )
............................................................
--
Shane Dixon
Linux Engineer
Atmel Corporation
_______________________________________________
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