MSVC: Select default standard libraries for ARM platform

For Windows ARM targets, only kernel32.lib and user32.lib are standard.
This commit is contained in:
Brad King 2014-08-05 15:02:49 -04:00
parent 2dfcf0ed07
commit 2b20110f68
1 changed files with 5 additions and 1 deletions

View File

@ -167,13 +167,17 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE)
set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc")
if(WINDOWS_PHONE) if(WINDOWS_PHONE)
set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") 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() 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") 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() endif()
else() else()
set(_PLATFORM_DEFINES "/DWIN32") 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(_RTC1 "/RTC1")
set(_FLAGS_CXX " /GR /EHsc") 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") 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")