[CMAKE/CLANG]

* Link mingwex when needed because having it globally won't do.
CORE-8516

svn path=/trunk/; revision=64105
This commit is contained in:
Amine Khaldi 2014-09-10 15:56:48 +00:00
parent 009e72443d
commit 37ff67c8fc
9 changed files with 38 additions and 1 deletions

View file

@ -33,6 +33,11 @@ add_library(d3dx9_36 SHARED
set_module_type(d3dx9_36 win32dll)
add_dependencies(d3dx9_36 d3d_idl_headers)
target_link_libraries(d3dx9_36 dxguid wine)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(d3dx9_36 mingwex)
endif()
add_importlibs(d3dx9_36 d3dcompiler_43 d3dxof user32 ole32 gdi32 msvcrt kernel32 ntdll)
add_pch(d3dx9_36 d3dx9_36_private.h SOURCE)
add_cd_file(TARGET d3dx9_36 DESTINATION reactos/system32 FOR all)

View file

@ -25,5 +25,10 @@ add_library(dsound SHARED
set_module_type(dsound win32dll)
target_link_libraries(dsound dxguid uuid wine)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(dsound mingwex)
endif()
add_importlibs(dsound winmm ole32 advapi32 user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET dsound DESTINATION reactos/system32 FOR all)

View file

@ -46,6 +46,11 @@ add_library(wined3d SHARED
set_module_type(wined3d win32dll)
target_link_libraries(wined3d wine)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(wined3d mingwex)
endif()
add_importlibs(wined3d user32 opengl32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_pch(wined3d wined3d_private.h SOURCE)
add_cd_file(TARGET wined3d DESTINATION reactos/system32 FOR all)

View file

@ -53,6 +53,10 @@ if((ARCH STREQUAL "i386") AND (NOT MSVC))
target_link_libraries(opengl32 mesa_x86)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(opengl32 mingwex)
endif()
set_module_type(opengl32 win32dll HOTPATCHABLE)
add_importlibs(opengl32 gdi32 user32 advapi32 msvcrt kernel32 ntdll)

View file

@ -7,6 +7,10 @@ list(APPEND SOURCE
add_library(beepmidi SHARED ${SOURCE})
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(beepmidi mingwex)
endif()
set_module_type(beepmidi win32dll UNICODE)
add_importlibs(beepmidi winmm msvcrt kernel32 ntdll)

View file

@ -33,6 +33,11 @@ add_library(gdiplus SHARED
set_module_type(gdiplus win32dll)
target_link_libraries(gdiplus wine)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(gdiplus mingwex)
endif()
add_delay_importlibs(gdiplus windowscodecs)
add_importlibs(gdiplus msvcrt shlwapi oleaut32 ole32 user32 gdi32 kernel32 ntdll)
add_pch(gdiplus gdiplus_private.h SOURCE)

View file

@ -106,6 +106,11 @@ set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS "${mshtml_rc_deps}
set_module_type(mshtml win32dll)
target_link_libraries(mshtml uuid wine strmiids oldnames)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(mshtml mingwex)
endif()
add_delay_importlibs(mshtml wininet)
add_importlibs(mshtml urlmon shlwapi shell32 ole32 oleaut32 user32 gdi32 advapi32 msvcrt kernel32 ntdll)
add_dependencies(mshtml mshtml_nsiface_header)

View file

@ -30,6 +30,10 @@ target_link_libraries(wdmaud.drv
libsamplerate
mmixer)
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
target_link_libraries(wdmaud.drv mingwex)
endif()
add_importlibs(wdmaud.drv user32 winmm advapi32 msvcrt setupapi ksuser kernel32 ntdll)
add_pch(wdmaud.drv wdmaud.h SOURCE)
add_cd_file(TARGET wdmaud.drv DESTINATION reactos/system32 FOR all)

View file

@ -56,7 +56,7 @@ set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
# Don't link with anything by default unless we say so
set(CMAKE_C_STANDARD_LIBRARIES "-lmingwex -lgcc" CACHE STRING "Standard C Libraries")
set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")
#MARK_AS_ADVANCED(CLEAR CMAKE_CXX_STANDARD_LIBRARIES)
set(CMAKE_CXX_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C++ Libraries")