* Add WIN32 and _WINDOWS definitions for i386 msvc builds.
* Skip some modules that do not compile, in msvc build.

svn path=/trunk/; revision=52418
This commit is contained in:
Amine Khaldi 2011-06-22 11:31:01 +00:00
parent 40fc6fe6d2
commit 583b4eb6ef
3 changed files with 24 additions and 8 deletions

View file

@ -47,7 +47,10 @@ if(NOT CMAKE_CROSSCOMPILING)
add_definitions(-DTARGET_${ARCH}) add_definitions(-DTARGET_${ARCH})
if(MSVC) if(MSVC)
add_definitions(-Dinline=__inline) if(ARCH MATCHES i386)
add_definitions(/DWIN32 /D_WINDOWS)
endif()
add_definitions(/Dinline=__inline)
else() else()
add_compiler_flags(-fshort-wchar) add_compiler_flags(-fshort-wchar)
endif() endif()

View file

@ -13,8 +13,12 @@ elseif(OPTIMIZE STREQUAL "5")
add_definitions(/GF /Gy /Ob2 /Os /Ox /GS-) add_definitions(/GF /Gy /Ob2 /Os /Ox /GS-)
endif() endif()
if(ARCH MATCHES i386)
add_definitions(/DWIN32 /D_WINDOWS)
endif()
add_definitions(/X /GR- /GS- /Zl) add_definitions(/X /GR- /GS- /Zl)
add_definitions(-Dinline=__inline -D__STDC__=1) add_definitions(/Dinline=__inline /D__STDC__=1)
if(${_MACHINE_ARCH_FLAG} MATCHES X86) if(${_MACHINE_ARCH_FLAG} MATCHES X86)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB")
@ -23,7 +27,7 @@ if(${_MACHINE_ARCH_FLAG} MATCHES X86)
endif() endif()
if(${ARCH} MATCHES amd64) if(${ARCH} MATCHES amd64)
add_definitions(-D__x86_64) add_definitions(/D__x86_64)
set(SPEC2DEF_ARCH x86_64) set(SPEC2DEF_ARCH x86_64)
else() else()
set(SPEC2DEF_ARCH i386) set(SPEC2DEF_ARCH i386)

View file

@ -89,9 +89,12 @@ add_subdirectory(msftedit)
add_subdirectory(msg711.acm) add_subdirectory(msg711.acm)
add_subdirectory(msgina) add_subdirectory(msgina)
add_subdirectory(msgsm32.acm) add_subdirectory(msgsm32.acm)
if(NOT MSVC)
#FIXME: msvc build.
add_subdirectory(mshtml) add_subdirectory(mshtml)
add_subdirectory(mshtml.tlb)
add_subdirectory(msi) add_subdirectory(msi)
endif()
add_subdirectory(mshtml.tlb)
add_subdirectory(msimg32) add_subdirectory(msimg32)
add_subdirectory(msimtf) add_subdirectory(msimtf)
add_subdirectory(msisip) add_subdirectory(msisip)
@ -164,7 +167,9 @@ add_subdirectory(sfc)
add_subdirectory(sfc_os) add_subdirectory(sfc_os)
add_subdirectory(shdoclc) add_subdirectory(shdoclc)
add_subdirectory(shdocvw) add_subdirectory(shdocvw)
add_subdirectory(shell32) if(NOT MSVC)
add_subdirectory(shell32) # FIXME: msvc build.
endif()
add_subdirectory(shfolder) add_subdirectory(shfolder)
add_subdirectory(shimgvw) add_subdirectory(shimgvw)
add_subdirectory(shlwapi) add_subdirectory(shlwapi)
@ -176,7 +181,9 @@ add_subdirectory(softpub)
add_subdirectory(spoolss) add_subdirectory(spoolss)
add_subdirectory(srclient) add_subdirectory(srclient)
add_subdirectory(stdole2.tlb) add_subdirectory(stdole2.tlb)
add_subdirectory(stdole32.tlb) if(NOT MSVC)
add_subdirectory(stdole32.tlb) # FIXME: msvc build.
endif()
add_subdirectory(sti) add_subdirectory(sti)
add_subdirectory(sxs) add_subdirectory(sxs)
add_subdirectory(syssetup) add_subdirectory(syssetup)
@ -192,7 +199,9 @@ add_subdirectory(unicows)
add_subdirectory(untfs) add_subdirectory(untfs)
add_subdirectory(updspapi) add_subdirectory(updspapi)
add_subdirectory(url) add_subdirectory(url)
add_subdirectory(urlmon) if(NOT MSVC)
add_subdirectory(urlmon) # FIXME: msvc build.
endif()
add_subdirectory(user32) add_subdirectory(user32)
add_subdirectory(userenv) add_subdirectory(userenv)
add_subdirectory(usp10) add_subdirectory(usp10)