Browse Source

Set WINCE to 1 when building for WindowsCE

Introduce a new variable WINCE to make the WindowsCE
system more easy to use in if statements.
Patrick Gansterer 13 years ago
parent
commit
fd2a0d58c5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      Modules/Platform/Windows-MSVC.cmake

+ 3 - 2
Modules/Platform/Windows-MSVC.cmake

@@ -41,6 +41,7 @@ set(WIN32 1)
 if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE")
   set(CMAKE_CREATE_WIN32_EXE "/subsystem:windowsce /entry:WinMainCRTStartup")
   set(CMAKE_CREATE_CONSOLE_EXE "/subsystem:windowsce /entry:mainACRTStartup")
+  set(WINCE 1)
 else()
   set(CMAKE_CREATE_WIN32_EXE "/subsystem:windows")
   set(CMAKE_CREATE_CONSOLE_EXE "/subsystem:console")
@@ -122,7 +123,7 @@ endif()
 # default to Debug builds
 set(CMAKE_BUILD_TYPE_INIT Debug)
 
-if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE")
+if(WINCE)
   string(TOUPPER "${MSVC_C_ARCHITECTURE_ID}" _MSVC_C_ARCHITECTURE_ID_UPPER)
   string(TOUPPER "${MSVC_CXX_ARCHITECTURE_ID}" _MSVC_CXX_ARCHITECTURE_ID_UPPER)
 
@@ -170,7 +171,7 @@ set(_MACHINE_ARCH_FLAG ${MSVC_C_ARCHITECTURE_ID})
 if(NOT _MACHINE_ARCH_FLAG)
   set(_MACHINE_ARCH_FLAG ${MSVC_CXX_ARCHITECTURE_ID})
 endif()
-if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE")
+if(WINCE)
   if(_MACHINE_ARCH_FLAG MATCHES "ARM")
     set(_MACHINE_ARCH_FLAG "THUMB")
   elseif(_MACHINE_ARCH_FLAG MATCHES "SH")