diff options
author | Brad King <brad.king@kitware.com> | 2014-08-12 14:03:03 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-08-12 14:03:03 (GMT) |
commit | 7365a9fe929c935a194987d3a4a68aff77129a2b (patch) | |
tree | c4688c028f66afba7a403b01a2a3ec7ccf98bc30 /Modules | |
parent | 755891c3d92b684e7884ccb3016e5a1da89bbbde (diff) | |
parent | 5d3d9a22b28e99894dab2fe4fac0279fb422ace4 (diff) | |
download | CMake-7365a9fe929c935a194987d3a4a68aff77129a2b.zip CMake-7365a9fe929c935a194987d3a4a68aff77129a2b.tar.gz CMake-7365a9fe929c935a194987d3a4a68aff77129a2b.tar.bz2 |
Merge topic 'vs-windows-phone-and-store'
5d3d9a22 Help: Add notes for topic 'vs-windows-phone-and-store'
401a00d9 VS: Set WindowsPhone and WindowsStore min VS version required
709cebde VS: Generate WindowsPhone and WindowsStore application types
72395ab2 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries
2074f581 MSVC: Add system libs for WindowsPhone and WindowsStore
c72f0887 MSVC: Add default WindowsPhone and WindowsStore compile flags
1c94558a MSVC: Disable incremental linking for WindowsPhone and WindowsStore
592098e2 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables
aa42a78f Add WindowsPhone and WindowsStore platform information modules
b94ddf6c CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore
d7938bff VS: Select WindowsPhone and WindowsStore default toolsets
3abd150c VS: Save WindowsPhone and WindowsStore system internally
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 12 | ||||
-rw-r--r-- | Modules/CompilerId/VS-10.vcxproj.in | 2 | ||||
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 18 | ||||
-rw-r--r-- | Modules/Platform/Windows.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/WindowsPhone-MSVC-C.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsPhone-MSVC-CXX.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsPhone.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsStore-MSVC-C.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsStore-MSVC-CXX.cmake | 1 | ||||
-rw-r--r-- | Modules/Platform/WindowsStore.cmake | 1 |
10 files changed, 38 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 025d296..a780fa6 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -168,6 +168,18 @@ Id flags: ${testflags} else() set(id_toolset "") endif() + if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(id_system "<ApplicationType>Windows Phone</ApplicationType>") + elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(id_system "<ApplicationType>Windows Store</ApplicationType>") + else() + set(id_system "") + endif() + if(id_system AND CMAKE_SYSTEM_VERSION) + set(id_system_version "<ApplicationTypeRevision>${CMAKE_SYSTEM_VERSION}</ApplicationTypeRevision>") + else() + set(id_system_version "") + endif() if(CMAKE_VS_WINCE_VERSION) set(id_entrypoint "mainACRTStartup") if("${vs_version}" VERSION_LESS 9) diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index 1a7a539..bacbca4 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -10,6 +10,8 @@ <ProjectGuid>{CAE07175-D007-4FC3-BFE8-47B392814159}</ProjectGuid> <RootNamespace>CompilerId@id_lang@</RootNamespace> <Keyword>Win32Proj</Keyword> + @id_system@ + @id_system_version@ </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration"> diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index e51c592..9d4aca2 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -162,6 +162,14 @@ if(WINCE) if (MSVC_VERSION LESS 1600) set(CMAKE_C_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT} corelibc.lib") endif () +elseif(WINDOWS_PHONE OR WINDOWS_STORE) + set(_FLAGS_C " /DUNICODE /D_UNICODE") + set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") + if(WINDOWS_PHONE) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") + else() + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib") + endif() else() set(_PLATFORM_DEFINES "/DWIN32") @@ -199,10 +207,12 @@ unset(_MACHINE_ARCH_FLAG) # add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtype # on versions that support it set( MSVC_INCREMENTAL_YES_FLAG "") -if(NOT MSVC_INCREMENTAL_DEFAULT) - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") -else() - set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) +if(NOT WINDOWS_PHONE AND NOT WINDOWS_STORE) + if(NOT MSVC_INCREMENTAL_DEFAULT) + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:YES") + else() + set( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL" ) + endif() endif() if (CMAKE_COMPILER_SUPPORTS_PDBTYPE) diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake index 7e97111..9a937a7 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 "") diff --git a/Modules/Platform/WindowsPhone-MSVC-C.cmake b/Modules/Platform/WindowsPhone-MSVC-C.cmake new file mode 100644 index 0000000..ce8060b --- /dev/null +++ b/Modules/Platform/WindowsPhone-MSVC-C.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-C) diff --git a/Modules/Platform/WindowsPhone-MSVC-CXX.cmake b/Modules/Platform/WindowsPhone-MSVC-CXX.cmake new file mode 100644 index 0000000..281eadc --- /dev/null +++ b/Modules/Platform/WindowsPhone-MSVC-CXX.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-CXX) diff --git a/Modules/Platform/WindowsPhone.cmake b/Modules/Platform/WindowsPhone.cmake new file mode 100644 index 0000000..65b2eae --- /dev/null +++ b/Modules/Platform/WindowsPhone.cmake @@ -0,0 +1 @@ +include(Platform/Windows) diff --git a/Modules/Platform/WindowsStore-MSVC-C.cmake b/Modules/Platform/WindowsStore-MSVC-C.cmake new file mode 100644 index 0000000..ce8060b --- /dev/null +++ b/Modules/Platform/WindowsStore-MSVC-C.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-C) diff --git a/Modules/Platform/WindowsStore-MSVC-CXX.cmake b/Modules/Platform/WindowsStore-MSVC-CXX.cmake new file mode 100644 index 0000000..281eadc --- /dev/null +++ b/Modules/Platform/WindowsStore-MSVC-CXX.cmake @@ -0,0 +1 @@ +include(Platform/Windows-MSVC-CXX) diff --git a/Modules/Platform/WindowsStore.cmake b/Modules/Platform/WindowsStore.cmake new file mode 100644 index 0000000..65b2eae --- /dev/null +++ b/Modules/Platform/WindowsStore.cmake @@ -0,0 +1 @@ +include(Platform/Windows) |