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.
This commit is contained in:
Patrick Gansterer 2013-02-01 23:23:09 +01:00
parent 1638124680
commit fd2a0d58c5

View File

@ -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")