summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2013-02-01 22:23:09 (GMT)
committerPatrick Gansterer <paroga@paroga.com>2013-02-01 22:26:03 (GMT)
commitfd2a0d58c5d0aa0529d4ac65cc899f6d1109fb15 (patch)
tree671efeafeb14ed6782b63c5aba335f7f23450676 /Modules/Platform
parent163812468054601c95ac894703a6299d3b324e22 (diff)
downloadCMake-fd2a0d58c5d0aa0529d4ac65cc899f6d1109fb15.zip
CMake-fd2a0d58c5d0aa0529d4ac65cc899f6d1109fb15.tar.gz
CMake-fd2a0d58c5d0aa0529d4ac65cc899f6d1109fb15.tar.bz2
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.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Windows-MSVC.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 5cbf9ee..3a38d8f 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/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")