Hello i am try build tinyxml library by mingw32 on gentoo linux with cmake: =dev-util/cmake-2.6.4-r3 =dev-util/cmake-2.8.0-r2
But have this errors: $ cmake -DCMAKE_TOOLCHAIN_FILE=~/i686-pc-mingw32.cmake - DDOKAN_INCLUDE_DIR=~/projects/dokan/ -DCMAKE_BUILD_TYPE=Debug . -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc -- Check for working C compiler: /usr/bin/i686-pc-mingw32-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++ -- Check for working CXX compiler: /usr/bin/i686-pc-mingw32-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: /home/kaa/projects/tinyxml $ make [ 12%] Building CXX object tinyxml_build/CMakeFiles/tinyxml.dir/tinystr.cpp.obj [ 25%] Building CXX object tinyxml_build/CMakeFiles/tinyxml.dir/tinyxml.cpp.obj [ 37%] Building CXX object tinyxml_build/CMakeFiles/tinyxml.dir/tinyxmlerror.cpp.obj [ 50%] Building CXX object tinyxml_build/CMakeFiles/tinyxml.dir/tinyxmlparser.cpp.obj Linking CXX static library /home/kaa/projects/sqlfs/target/Debug/libtinyxml.a Error running link command: No such file or directory make[2]: *** [/home/kaa/projects/win32/target/Debug/libtinyxml.a] Error 2 make[1]: *** [tinyxml_build/CMakeFiles/tinyxml.dir/all] Error 2 make: *** [all] Error 2 I "fix" problem by patching CMakeFindBinUtils.cmake Please fix and release 2.6.x and 2.8.x version
SET(CMAKE_SYSTEM_NAME Windows) SET(CMAKE_C_COMPILER i686-pc-mingw32-gcc) SET(CMAKE_CXX_COMPILER i686-pc-mingw32-g++) SET(CMAKE_AR i686-pc-mingw32-ar) SET(CMAKE_RANLIB i686-pc-mingw32-ranlib) SET(CMAKE_RC_COMPILER i686-pc-mingw32-windres) SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <SOURCE> <OBJECT>") SET(CMAKE_FIND_ROOT_PATH /usr/i686-pc-mingw32) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
--- CMakeFindBinUtils.cmake.bak 2009-11-13 20:32:50.000000000 +0200 +++ CMakeFindBinUtils.cmake 2010-02-27 20:40:14.000000000 +0200 @@ -43,7 +43,9 @@ ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") - FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + IF(NOT CMAKE_AR) + FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) + ENDIF(NOT CMAKE_AR) FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib HINTS ${_CMAKE_TOOLCHAIN_LOCATION}) IF(NOT CMAKE_RANLIB)
_______________________________________________ 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