[3RDPARTY] Make some warnings non-fatal
[reactos.git] / dll / directx / wine / d3dcompiler_43 / CMakeLists.txt
index 5b3c473..efae762 100644 (file)
@@ -3,8 +3,12 @@ add_definitions(
     -D__WINESRC__
     -DDIRECT3D_VERSION=0x0900)
 
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
+if(MSVC)
+    # error C4133: 'function': incompatible types - from 'D3D_CBUFFER_TYPE *' to 'DWORD *'
+    replace_compile_flags("/we4133" " ")
+endif()
 
+include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(d3dcompiler_43.dll d3dcompiler_43.spec ADD_IMPORTLIB)
 
 list(APPEND SOURCE
@@ -14,22 +18,30 @@ list(APPEND SOURCE
     blob.c
     bytecodewriter.c
     compiler.c
-    d3dcompiler_43_main.c
     hlsl.tab.c
     hlsl.yy.c
+    main.c
     reflection.c
     utils.c
-    d3dcompiler_private.h
+    precomp.h
     ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c)
 
-add_library(d3dcompiler_43 SHARED
+add_library(d3dcompiler_43 MODULE
     ${SOURCE}
     version.rc
     ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43.def)
 
+# some files have been generated with relative file paths...
+set_source_files_properties(
+    asmshader.tab.c
+    asmshader.yy.c
+    hlsl.tab.c
+    hlsl.yy.c
+    PROPERTIES COMPILE_FLAGS "-UREACTOS_SOURCE_DIR -DREACTOS_SOURCE_DIR=\"\\\".\\\"\"")
+
 set_module_type(d3dcompiler_43 win32dll)
 target_link_libraries(d3dcompiler_43 dx10guid uuid wine wpp)
 add_importlibs(d3dcompiler_43 msvcrt kernel32 ntdll)
 add_dependencies(d3dcompiler_43 d3d_idl_headers)
-add_pch(d3dcompiler_43 d3dcompiler_private.h SOURCE)
+#add_pch(d3dcompiler_43 precomp.h SOURCE)
 add_cd_file(TARGET d3dcompiler_43 DESTINATION reactos/system32 FOR all)