In your toolchain file, what do you have CMAKE_FIND_ROOT_PATH_MODE_INCLUDE set to? If it is set to ONLY, then cmake will only look in the CMAKE_FIND_ROOT_PATH for boost, which is probably set to $QNX_TARGET. Since you most likely don't have boost in your $QNX_TARGET directory, findBoost will fail. I set it to BOTH in my toolchain file, although I'm not sure this is entirely a good idea. Alternatively you can copy the boost tree into $QNX_TARGET/usr/include or somewhere. Maybe there's a better solution I'm not aware of?
-kito > ------------------------------ > > Message: 5 > Date: Mon, 30 Mar 2009 16:41:40 +1100 > From: ross hennessy <[email protected]> > Subject: [CMake] FindBoost problem when cross-compiling > To: [email protected] > Message-ID: > <[email protected]> > Content-Type: text/plain; charset="iso-8859-1" > > I'm having a problem with FindBoost.cmake with cmake 2.6.3 under win32 when > cross-compiling only ( I have boost version 1.38.0). I have the environment > variable BOOST_ROOT set to the directory containing the install of boost. If > I build my project using "default native compilers" for VS 2008 the > FindBoost works fine. When I select "specify toolchain for crosscompiling" > to build for QNX Momentics, the FindBoost stops working. Can somebody please > help me out as I've spent some time to look into this and it doesn't seem to > be an incorrect usage of FindBoost. Here is the output from cmake when I hit > configure - > > Compiling for QNX Momentics > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:322 ] > Boost not in cache > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:325 ] > _boost_TEST_VERSIONS = > 1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33 > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:327 ] > Boost_USE_MULTITHREADED = TRUE > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:329 ] > Boost_USE_STATIC_LIBS = > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:387 ] > Declared as CMake or Environmental Variables: > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:389 ] > BOOST_ROOT = C:/dev/libraries/boost > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:391 ] > BOOST_INCLUDEDIR = > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:393 ] > BOOST_LIBRARYDIR = > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:395 ] > _boost_TEST_VERSIONS = > 1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33 > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:445 ] > Include debugging info: > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:447 ] > _boost_INCLUDE_SEARCH_DIRS = > C:/dev/libraries/boost/include;C:/dev/libraries/boost;C:/boost/include;C:/boost;C:\Program > Files/boost;/sw/local/include > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:449 ] > _boost_PATH_SUFFIXES = > boost-1_38_0;boost-1_38;boost-1_37_0;boost-1_37;boost-1_36_1;boost-1_36_0;boost-1_36;boost-1_35_1;boost-1_35_0;boost-1_35;boost-1_34_1;boost-1_34_0;boost-1_34;boost-1_33_1;boost-1_33_0;boost-1_33 > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:580 ] > guessed _boost_COMPILER = -gcc > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:590 ] > _boost_MULTITHREADED = -mt > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:606 ] > _boost_STATIC_TAG = > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:608 ] > _boost_ABI_TAG = d > > [ C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/FindBoost.cmake:637 ] > _boost_LIBRARIES_SEARCH_DIRS = > C:/dev/libraries/boost/lib;C:/dev/libraries/boost/stage/lib;C:/boost/lib;C:/boost;C:\Program > Files/boost/boost___/lib;C:\Program Files/boost;/sw/local/lib > > CMake Error at C:/Program Files/CMake > 2.6/share/cmake-2.6/Modules/FindBoost.cmake:846 (message): > > Unable to find the requested Boost libraries. > > Unable to find the Boost header files. Please set BOOST_ROOT to the root > > directory containing Boost or BOOST_INCLUDEDIR to the directory containing > > Boost's headers. > > Call Stack (most recent call first): > > CMakeLists.txt:223 (FIND_PACKAGE) > > > The Boost_INCLUDE_DIR should be set to C:/dev/libraries/boost/boost_1_38_0 > which is what happens when I build natively instead of crosscompiling. I'm > basically down to the one line (454) in FindBoost.cmake where it calls > FIND_PATH for boost/config.hpp and all inputs look correct so I can't do any > further debugging to work out what is failing. The only thing I can think of > is that the QNX.cmake platform file is included from the toolchain file, > which in turn includes the UnixPaths.cmake which means UNIX is set, but > WIN32 isn't (I'm not sure how this would affect FIND_PATH though?). > > Thanks, Ross > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://www.cmake.org/pipermail/cmake/attachments/20090330/7f25dda2/attachment.htm> _______________________________________________ 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
