From 592098e2d5a00d396e84d7a5e51ae6c550a21fc6 Mon Sep 17 00:00:00 2001 From: Gilles Khouzam Date: Mon, 28 Jul 2014 14:19:45 -0400 Subject: [PATCH] Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables Set one of these when CMAKE_SYSTEM_NAME is "WindowsPhone" or "WindowsStore", respectively. --- Help/manual/cmake-variables.7.rst | 2 ++ Help/variable/WINDOWS_PHONE.rst | 5 +++++ Help/variable/WINDOWS_STORE.rst | 5 +++++ Modules/Platform/Windows.cmake | 4 ++++ 4 files changed, 16 insertions(+) create mode 100644 Help/variable/WINDOWS_PHONE.rst create mode 100644 Help/variable/WINDOWS_STORE.rst diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 05a7b334e..e622784bc 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -190,6 +190,8 @@ Variables that Describe the System /variable/MSVC_VERSION /variable/UNIX /variable/WIN32 + /variable/WINDOWS_PHONE + /variable/WINDOWS_STORE /variable/XCODE_VERSION Variables that Control the Build diff --git a/Help/variable/WINDOWS_PHONE.rst b/Help/variable/WINDOWS_PHONE.rst new file mode 100644 index 000000000..61d91b00a --- /dev/null +++ b/Help/variable/WINDOWS_PHONE.rst @@ -0,0 +1,5 @@ +WINDOWS_PHONE +------------- + +True when the :variable:`CMAKE_SYSTEM_NAME` variable is set +to ``WindowsPhone``. diff --git a/Help/variable/WINDOWS_STORE.rst b/Help/variable/WINDOWS_STORE.rst new file mode 100644 index 000000000..dae3b539b --- /dev/null +++ b/Help/variable/WINDOWS_STORE.rst @@ -0,0 +1,5 @@ +WINDOWS_STORE +------------- + +True when the :variable:`CMAKE_SYSTEM_NAME` variable is set +to ``WindowsStore``. diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake index 7e97111dc..9a937a7e8 100644 --- a/Modules/Platform/Windows.cmake +++ b/Modules/Platform/Windows.cmake @@ -2,6 +2,10 @@ set(WIN32 1) if(CMAKE_SYSTEM_NAME STREQUAL "WindowsCE") set(WINCE 1) +elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(WINDOWS_PHONE 1) +elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WINDOWS_STORE 1) endif() set(CMAKE_STATIC_LIBRARY_PREFIX "")