Hi, I'm trying to set up a cross-compilation build system using CMake.
I followed the following instructions: http://www.vtk.org/Wiki/CMake_Cross_Compiling My toolchain file: # the name of the target operating system SET(CMAKE_SYSTEM_NAME Vdwos) # which C and C++ compiler to use SET(CMAKE_C_COMPILER_WORKS 1) SET(CMAKE_CXX_COMPILER_WORKS 1) SET(CMAKE_C_COMPILER nios2-elf-gcc) SET(CMAKE_CXX_COMPILER nios2-elf-g++) # here is the target environment located SET(CMAKE_FIND_ROOT_PATH C:/svn/MC21/trunk/sysIoDummy_pos/ ) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) Part of my Vdwos.cmake (in share/../Modules/Platforms) # find Vdwos system files FIND_PATH(VDWOS_SYSTEM_HEADER_PATH NAMES vdw_types.h ) FIND_LIBRARY(VDW_SYSTEM_LIBRARY NAMES libsystem.a ) IF(NOT VDWOS_SYSTEM_HEADER_PATH) MESSAGE(FATAL_ERROR "Could not find Vdwos system/include/vdw_types.h. Set up CMAKE_FIND_ROOT_PATH correctly.") ENDIF(NOT VDWOS_SYSTEM_HEADER_PATH) IF(NOT VDW_SYSTEM_LIBRARY) MESSAGE(FATAL_ERROR "Could not find Vdwos \"libsystem.a\". Set up CMAKE_FIND_ROOT_PATH correctly.") ENDIF(NOT VDW_SYSTEM_LIBRARY) When running C:\nios2\tools\CMake 2.6\bin\cmake.exe -G "MSYS Makefiles" ../ -DCMAKE_TOOLCHAIN_FILE=c:\svn\MC21\workspace\TestCMake\Platform\Toolchai n-nios2-iodummy.cmake I get: -- The C compiler identification is GNU -- The CXX compiler identification is GNU CMake Error at C:/nios2/tools/CMake 2.6/share/cmake-2.6/Modules/Platform/Vdwos.cmake:24 (MESSAGE): Could not find Vdwos system/include/vdw_types.h. Set up CMAKE_FIND_ROOT_PATH correctly. Call Stack (most recent call first): C:/nios2/tools/CMake 2.6/share/cmake-2.6/Modules/CMakeSystemSpecificInformation.cmake:23 (INCLUDE) :2242786 (PROJECT) What am I doing wrong here? I started my Vdwos.cmake from eCos.cmake so I think those statements should work? Kind regards, Sander. _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake