[CMAKE/CLANG]
authorAmine Khaldi <amine.khaldi@reactos.org>
Wed, 10 Sep 2014 15:56:48 +0000 (15:56 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Wed, 10 Sep 2014 15:56:48 +0000 (15:56 +0000)
* Link mingwex when needed because having it globally won't do.
CORE-8516

svn path=/trunk/; revision=64105

reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt
reactos/dll/directx/wine/dsound/CMakeLists.txt
reactos/dll/directx/wine/wined3d/CMakeLists.txt
reactos/dll/opengl/opengl32/CMakeLists.txt
reactos/dll/win32/beepmidi/CMakeLists.txt
reactos/dll/win32/gdiplus/CMakeLists.txt
reactos/dll/win32/mshtml/CMakeLists.txt
reactos/dll/win32/wdmaud.drv/CMakeLists.txt
reactos/toolchain-clang.cmake

index b20029e..d366786 100644 (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)
index 9d81dc6..f536368 100644 (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)
index 99810a6..ade664a 100644 (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)
index 9a14f68..7dbaa0e 100644 (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)
index c8d0dbb..fac6040 100644 (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)
index 8a75a75..d8f69ad 100644 (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)
index 012cd04..4fea5a1 100644 (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)
index 38bd5e0..f23bc04 100644 (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)
index 6a41373..5bc72d9 100644 (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")