From 2b20110f681d180f12f4c200df1489eeb242d1b2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Aug 2014 15:02:49 -0400 Subject: MSVC: Select default standard libraries for ARM platform For Windows ARM targets, only kernel32.lib and user32.lib are standard. --- Modules/Platform/Windows-MSVC.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 9d4aca2..0c2e21b 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -167,13 +167,17 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE) set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") if(WINDOWS_PHONE) set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") + elseif(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.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") - if(MSVC_VERSION GREATER 1310) + if(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") + elseif(MSVC_VERSION GREATER 1310) set(_RTC1 "/RTC1") set(_FLAGS_CXX " /GR /EHsc") set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib") -- cgit v0.12