[CMake] WinCE environment

Benjamin Köppl benjamin.koeppl at ascolab.com
Fri Jul 24 05:58:53 EDT 2009


Hi there!

At the moment I have to set up the environment for the WinCE Platform. 
This is very annoying! I could set up the environment to use CMake for 
WinCE, but there are different compiler problems. These problems are not 
present under the Visual Stusio 2005 or 2008. So I don't know if I set 
up the environment correctly. Is it possible to show me how to use this 
environment in a correct way? This is my configuration:

The Toolchain file:
# this one is important
SET(CMAKE_SYSTEM_NAME windowsce)
#this one not so much
SET(CMAKE_SYSTEM_VERSION_HEX 0x600)
SET(CMAKE_SYSTEM_PROCESSOR x86)

SET(TOOLCHAIN_PATH "C:/WINCE600/SDK/BIN/I386/x86")

# specify the cross compiler
SET(CMAKE_C_COMPILER ${TOOLCHAIN_PATH}/cl.exe)
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_PATH}/cl.exe)

SET(CMAKE_FIND_ROOT_PATH "C:/Programme/Windows CE 
Tools/wce500/Beckhoff_HMI_500/Lib/x86")

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH "C:/WINCE600/SDK/BIN/I386")

# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
****************************************************************
Here is my environment I set:


@SET VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 8
@SET VCINSTALLDIR=C:\Programme\Microsoft Visual Studio 8\VC
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR

@echo Setting environment for using Microsoft Visual Studio 2005 x86 tools.

@rem
@rem Root of Visual Studio IDE installed files.
@rem
@set DevEnvDir=C:\Programme\Microsoft Visual Studio 8\Common7\IDE

@set PATH=C:\Programme\Microsoft Visual Studio 
8\Common7\IDE;C:\Programme\Microsoft Visual Studio 
8\VC\BIN;C:\Programme\Microsoft Visual Studio 
8\Common7\Tools;C:\Programme\Microsoft Visual Studio 
8\Common7\Tools\bin;C:\Programme\Microsoft Visual Studio 
8\VC\PlatformSDK\bin;C:\Programme\Microsoft Visual Studio 
8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Programme\Microsoft 
Visual Studio 8\VC\VCPackages;%PATH%
@set INCLUDE=C:\Programme\Microsoft Visual Studio 
8\VC\ATLMFC\INCLUDE;C:\Programme\Microsoft Visual Studio 
8\VC\INCLUDE;C:\Programme\Windows CE 
Tools\wce500\Beckhoff_HMI_500\Include\X86;C:\Programme\Microsoft Visual 
Studio 8\VC\ce\include;%INCLUDE%
@set LIB=C:\Programme\Microsoft Visual Studio 
8\VC\ATLMFC\LIB;C:\Programme\Microsoft Visual Studio 
8\VC\LIB;C:\Programme\Microsoft Visual Studio 
8\VC\PlatformSDK\lib;C:\Programme\Microsoft Visual Studio 
8\SDK\v2.0\lib;%LIB%
@set 
LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Programme\Microsoft 
Visual Studio 8\VC\ATLMFC\LIB

@goto end

:error_no_VSINSTALLDIR
@echo ERROR: VSINSTALLDIR variable is not set.
@goto end

:error_no_VCINSTALLDIR
@echo ERROR: VCINSTALLDIR variable is not set.
@goto end

:end
-- 
mit freundlichen Grüßen / best regards

*Benjamin Köppl*
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 125
Fax: +49 9131 691 128
Web: http://www.ascolab.com

--

ascolab GmbH
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 • 91058 Erlangen • Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth



More information about the CMake mailing list