diff --git a/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt b/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt index b20029e0510..d366786d560 100644 --- a/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt +++ b/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt @@ -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) diff --git a/reactos/dll/directx/wine/dsound/CMakeLists.txt b/reactos/dll/directx/wine/dsound/CMakeLists.txt index 9d81dc6c6c7..f5363688bcb 100644 --- a/reactos/dll/directx/wine/dsound/CMakeLists.txt +++ b/reactos/dll/directx/wine/dsound/CMakeLists.txt @@ -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) diff --git a/reactos/dll/directx/wine/wined3d/CMakeLists.txt b/reactos/dll/directx/wine/wined3d/CMakeLists.txt index 99810a6ff4d..ade664ab1cd 100644 --- a/reactos/dll/directx/wine/wined3d/CMakeLists.txt +++ b/reactos/dll/directx/wine/wined3d/CMakeLists.txt @@ -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) diff --git a/reactos/dll/opengl/opengl32/CMakeLists.txt b/reactos/dll/opengl/opengl32/CMakeLists.txt index 9a14f68ee0e..7dbaa0e8744 100644 --- a/reactos/dll/opengl/opengl32/CMakeLists.txt +++ b/reactos/dll/opengl/opengl32/CMakeLists.txt @@ -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) diff --git a/reactos/dll/win32/beepmidi/CMakeLists.txt b/reactos/dll/win32/beepmidi/CMakeLists.txt index c8d0dbb603d..fac6040b173 100644 --- a/reactos/dll/win32/beepmidi/CMakeLists.txt +++ b/reactos/dll/win32/beepmidi/CMakeLists.txt @@ -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) diff --git a/reactos/dll/win32/gdiplus/CMakeLists.txt b/reactos/dll/win32/gdiplus/CMakeLists.txt index 8a75a7507f2..d8f69adb96d 100644 --- a/reactos/dll/win32/gdiplus/CMakeLists.txt +++ b/reactos/dll/win32/gdiplus/CMakeLists.txt @@ -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) diff --git a/reactos/dll/win32/mshtml/CMakeLists.txt b/reactos/dll/win32/mshtml/CMakeLists.txt index 012cd047b88..4fea5a1aaf0 100644 --- a/reactos/dll/win32/mshtml/CMakeLists.txt +++ b/reactos/dll/win32/mshtml/CMakeLists.txt @@ -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) diff --git a/reactos/dll/win32/wdmaud.drv/CMakeLists.txt b/reactos/dll/win32/wdmaud.drv/CMakeLists.txt index 38bd5e059c2..f23bc045c78 100644 --- a/reactos/dll/win32/wdmaud.drv/CMakeLists.txt +++ b/reactos/dll/win32/wdmaud.drv/CMakeLists.txt @@ -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) diff --git a/reactos/toolchain-clang.cmake b/reactos/toolchain-clang.cmake index 6a413738fc2..5bc72d90efb 100644 --- a/reactos/toolchain-clang.cmake +++ b/reactos/toolchain-clang.cmake @@ -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")