From 24e4d63d1fbe6c5166cc37a11161dac47b61791d Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sun, 9 Feb 2014 23:29:31 +0000 Subject: [PATCH] [DIRECTX] * Prepare the CMake scripts for PCH. CORE-7716 svn path=/trunk/; revision=62089 --- reactos/dll/directx/wine/amstream/CMakeLists.txt | 7 ++++++- reactos/dll/directx/wine/d3d8/CMakeLists.txt | 7 +++++-- reactos/dll/directx/wine/d3d9/CMakeLists.txt | 7 +++++-- .../dll/directx/wine/d3dcompiler_43/CMakeLists.txt | 9 +++++++-- reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt | 7 ++++++- reactos/dll/directx/wine/d3dxof/CMakeLists.txt | 9 +++++++-- reactos/dll/directx/wine/ddraw/CMakeLists.txt | 12 ++++++++---- reactos/dll/directx/wine/devenum/CMakeLists.txt | 8 ++++++-- reactos/dll/directx/wine/dinput/CMakeLists.txt | 9 +++++++-- reactos/dll/directx/wine/dmusic/CMakeLists.txt | 8 ++++++-- reactos/dll/directx/wine/dplayx/CMakeLists.txt | 7 ++++++- reactos/dll/directx/wine/dxdiagn/CMakeLists.txt | 10 +++++++--- reactos/dll/directx/wine/dxgi/CMakeLists.txt | 7 ++++++- reactos/dll/directx/wine/msdmo/CMakeLists.txt | 7 ++++++- reactos/dll/directx/wine/qedit/CMakeLists.txt | 8 ++++++-- reactos/dll/directx/wine/quartz/CMakeLists.txt | 11 +++++++---- reactos/dll/directx/wine/wined3d/CMakeLists.txt | 8 ++++++-- 17 files changed, 107 insertions(+), 34 deletions(-) diff --git a/reactos/dll/directx/wine/amstream/CMakeLists.txt b/reactos/dll/directx/wine/amstream/CMakeLists.txt index 7553c828e09..2a3590db72b 100644 --- a/reactos/dll/directx/wine/amstream/CMakeLists.txt +++ b/reactos/dll/directx/wine/amstream/CMakeLists.txt @@ -12,10 +12,15 @@ list(APPEND SOURCE main.c mediastream.c mediastreamfilter.c + amstream_private.h) + +add_library(amstream SHARED + ${SOURCE} + version.rc ${CMAKE_CURRENT_BINARY_DIR}/amstream.def) -add_library(amstream SHARED ${SOURCE} version.rc) set_module_type(amstream win32dll) target_link_libraries(amstream strmbase strmiids uuid wine) add_importlibs(amstream ole32 msvcrt kernel32 ntdll) +add_pch(amstream amstream_private.h SOURCE) add_cd_file(TARGET amstream DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/d3d8/CMakeLists.txt b/reactos/dll/directx/wine/d3d8/CMakeLists.txt index 437f393c4d1..d96473e41a0 100644 --- a/reactos/dll/directx/wine/d3d8/CMakeLists.txt +++ b/reactos/dll/directx/wine/d3d8/CMakeLists.txt @@ -18,13 +18,16 @@ list(APPEND SOURCE texture.c vertexdeclaration.c volume.c + d3d8_private.h) + +add_library(d3d8 SHARED + ${SOURCE} guid.c version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3d8.def) -add_library(d3d8 SHARED ${SOURCE}) set_module_type(d3d8 win32dll UNICODE) target_link_libraries(d3d8 uuid wine) add_importlibs(d3d8 wined3d msvcrt kernel32 ntdll) -add_pch(d3d8 d3d8_private.h) +add_pch(d3d8 d3d8_private.h SOURCE) add_cd_file(TARGET d3d8 DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/d3d9/CMakeLists.txt b/reactos/dll/directx/wine/d3d9/CMakeLists.txt index 0465e1bb711..77bdc5472b4 100644 --- a/reactos/dll/directx/wine/d3d9/CMakeLists.txt +++ b/reactos/dll/directx/wine/d3d9/CMakeLists.txt @@ -20,14 +20,17 @@ list(APPEND SOURCE texture.c vertexdeclaration.c volume.c + d3d9_private.h) + +add_library(d3d9 SHARED + ${SOURCE} guid.c version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3d9_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3d9.def) -add_library(d3d9 SHARED ${SOURCE}) set_module_type(d3d9 win32dll UNICODE) target_link_libraries(d3d9 wine) add_importlibs(d3d9 wined3d msvcrt kernel32 ntdll) -add_pch(d3d9 d3d9_private.h) +add_pch(d3d9 d3d9_private.h SOURCE) add_cd_file(TARGET d3d9 DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt b/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt index e99f39621c5..5b3c473cb9c 100644 --- a/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt +++ b/reactos/dll/directx/wine/d3dcompiler_43/CMakeLists.txt @@ -19,12 +19,17 @@ list(APPEND SOURCE hlsl.yy.c reflection.c utils.c - ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c + d3dcompiler_private.h + ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c) + +add_library(d3dcompiler_43 SHARED + ${SOURCE} + version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43.def) -add_library(d3dcompiler_43 SHARED ${SOURCE} version.rc) 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_cd_file(TARGET d3dcompiler_43 DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt b/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt index 67206a49be3..b20029e0510 100644 --- a/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt +++ b/reactos/dll/directx/wine/d3dx9_36/CMakeLists.txt @@ -21,13 +21,18 @@ list(APPEND SOURCE util.c volume.c xfile.c + d3dx9_36_private.h) + +add_library(d3dx9_36 SHARED + ${SOURCE} guid.c + version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_36_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_36.def) -add_library(d3dx9_36 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_36 win32dll) add_dependencies(d3dx9_36 d3d_idl_headers) target_link_libraries(d3dx9_36 dxguid wine) 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/d3dxof/CMakeLists.txt b/reactos/dll/directx/wine/d3dxof/CMakeLists.txt index 0cf261b1397..3219363766a 100644 --- a/reactos/dll/directx/wine/d3dxof/CMakeLists.txt +++ b/reactos/dll/directx/wine/d3dxof/CMakeLists.txt @@ -7,12 +7,17 @@ spec2def(d3dxof.dll d3dxof.spec ADD_IMPORTLIB) list(APPEND SOURCE d3dxof.c main.c - mszip.c parsing.c + d3dxof_private.h) + +add_library(d3dxof SHARED + ${SOURCE} + mszip.c + version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dxof.def) -add_library(d3dxof SHARED ${SOURCE} version.rc) set_module_type(d3dxof win32dll) target_link_libraries(d3dxof dxguid uuid wine) add_importlibs(d3dxof msvcrt kernel32 ntdll) +add_pch(d3dxof d3dxof_private.h SOURCE) add_cd_file(TARGET d3dxof DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/ddraw/CMakeLists.txt b/reactos/dll/directx/wine/ddraw/CMakeLists.txt index 5872db063de..115bc59fb6c 100644 --- a/reactos/dll/directx/wine/ddraw/CMakeLists.txt +++ b/reactos/dll/directx/wine/ddraw/CMakeLists.txt @@ -20,8 +20,8 @@ list(APPEND SOURCE utils.c vertexbuffer.c viewport.c - ${CMAKE_CURRENT_BINARY_DIR}/ddraw_stubs.c - ${CMAKE_CURRENT_BINARY_DIR}/ddraw.def) + ddraw_private.h + ${CMAKE_CURRENT_BINARY_DIR}/ddraw_stubs.c) if(MSVC) # FIXME: http://www.cmake.org/Bug/view.php?id=12998 @@ -29,10 +29,14 @@ if(MSVC) set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/FIwine/typeof.h") endif() -add_library(ddraw SHARED ${SOURCE} ddraw.rc) +add_library(ddraw SHARED + ${SOURCE} + ddraw.rc + ${CMAKE_CURRENT_BINARY_DIR}/ddraw.def) + set_module_type(ddraw win32dll) target_link_libraries(ddraw wine uuid dxguid ${PSEH_LIB}) add_importlibs(ddraw advapi32 gdi32 user32 wined3d msvcrt kernel32 ntdll) add_dependencies(ddraw wineheaders) -add_pch(ddraw ddraw_private.h) +add_pch(ddraw ddraw_private.h SOURCE) add_cd_file(TARGET ddraw DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/devenum/CMakeLists.txt b/reactos/dll/directx/wine/devenum/CMakeLists.txt index 2c1aa600929..52d6f4a01a7 100644 --- a/reactos/dll/directx/wine/devenum/CMakeLists.txt +++ b/reactos/dll/directx/wine/devenum/CMakeLists.txt @@ -12,12 +12,16 @@ list(APPEND SOURCE factory.c mediacatenum.c parsedisplayname.c + devenum_private.h) + +add_library(devenum SHARED + ${SOURCE} + devenum.rc ${CMAKE_CURRENT_BINARY_DIR}/devenum.def) -add_library(devenum SHARED ${SOURCE} devenum.rc) set_source_files_properties(devenum.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/devenum_classes.rgs) set_module_type(devenum win32dll UNICODE) target_link_libraries(devenum strmiids uuid wine) add_importlibs(devenum advapi32 ole32 oleaut32 winmm user32 avicap32 msvcrt kernel32 ntdll) -add_pch(devenum devenum_private.h) +add_pch(devenum devenum_private.h SOURCE) add_cd_file(TARGET devenum DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/dinput/CMakeLists.txt b/reactos/dll/directx/wine/dinput/CMakeLists.txt index c7d9ed2bf5d..5e2809fff35 100644 --- a/reactos/dll/directx/wine/dinput/CMakeLists.txt +++ b/reactos/dll/directx/wine/dinput/CMakeLists.txt @@ -5,7 +5,6 @@ spec2def(dinput.dll dinput.spec ADD_IMPORTLIB) list(APPEND SOURCE config.c - data_formats.c device.c dinput_main.c effect_linuxinput.c @@ -15,12 +14,18 @@ list(APPEND SOURCE joystick_osx.c keyboard.c mouse.c + dinput_private.h) + +add_library(dinput SHARED + ${SOURCE} + data_formats.c + dinput.rc ${CMAKE_CURRENT_BINARY_DIR}/dinput.def) -add_library(dinput SHARED ${SOURCE} dinput.rc) add_library(dinput_data_formats data_formats.c) add_dependencies(dinput_data_formats psdk) set_module_type(dinput win32dll) target_link_libraries(dinput dxguid uuid wine) add_importlibs(dinput comctl32 ole32 user32 advapi32 msvcrt kernel32 ntdll) +add_pch(dinput dinput_private.h SOURCE) add_cd_file(TARGET dinput DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/dmusic/CMakeLists.txt b/reactos/dll/directx/wine/dmusic/CMakeLists.txt index 1ed48641bdb..6bb39f0543e 100644 --- a/reactos/dll/directx/wine/dmusic/CMakeLists.txt +++ b/reactos/dll/directx/wine/dmusic/CMakeLists.txt @@ -12,11 +12,15 @@ list(APPEND SOURCE download.c instrument.c port.c + dmusic_private.h) + +add_library(dmusic SHARED + ${SOURCE} + version.rc ${CMAKE_CURRENT_BINARY_DIR}/dmusic.def) -add_library(dmusic SHARED ${SOURCE} version.rc) set_module_type(dmusic win32dll) target_link_libraries(dmusic dxguid uuid wine) add_importlibs(dmusic ole32 advapi32 winmm msvcrt kernel32 ntdll) -add_pch(dmusic dmusic_private.h) +add_pch(dmusic dmusic_private.h SOURCE) add_cd_file(TARGET dmusic DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/dplayx/CMakeLists.txt b/reactos/dll/directx/wine/dplayx/CMakeLists.txt index dfb38fdaf5d..8b6ba4a54be 100644 --- a/reactos/dll/directx/wine/dplayx/CMakeLists.txt +++ b/reactos/dll/directx/wine/dplayx/CMakeLists.txt @@ -17,10 +17,15 @@ list(APPEND SOURCE dplobby.c lobbysp.c name_server.c + dplayx_global.h) + +add_library(dplayx SHARED + ${SOURCE} + version.rc ${CMAKE_CURRENT_BINARY_DIR}/dplayx.def) -add_library(dplayx SHARED ${SOURCE} version.rc) set_module_type(dplayx win32dll) target_link_libraries(dplayx dxguid uuid wine) add_importlibs(dplayx winmm ole32 user32 advapi32 msvcrt kernel32 ntdll) +add_pch(dplayx dplayx_global.h SOURCE) add_cd_file(TARGET dplayx DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt b/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt index 3dfae1332f6..a2c71b37a8f 100644 --- a/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt +++ b/reactos/dll/directx/wine/dxdiagn/CMakeLists.txt @@ -2,19 +2,23 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(dxdiagn.dll dxdiagn.spec) +add_idl_headers(dxdiagn_idlheader fil_data.idl) list(APPEND SOURCE container.c dxdiag_main.c provider.c + dxdiag_private.h) + +add_library(dxdiagn SHARED + ${SOURCE} guid.c + dxdiagn.rc ${CMAKE_CURRENT_BINARY_DIR}/dxdiagn.def) -add_idl_headers(dxdiagn_idlheader fil_data.idl) -add_library(dxdiagn SHARED ${SOURCE} dxdiagn.rc) set_module_type(dxdiagn win32dll) target_link_libraries(dxdiagn strmiids dxguid uuid wine) add_dependencies(dxdiagn dxdiagn_idlheader) add_importlibs(dxdiagn d3d9 ddraw version ole32 oleaut32 psapi user32 msvcrt kernel32 ntdll) -add_pch(dxdiagn dxdiag_private.h) +add_pch(dxdiagn dxdiag_private.h SOURCE) add_cd_file(TARGET dxdiagn DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/dxgi/CMakeLists.txt b/reactos/dll/directx/wine/dxgi/CMakeLists.txt index bcf2b38810c..38c8af1744f 100644 --- a/reactos/dll/directx/wine/dxgi/CMakeLists.txt +++ b/reactos/dll/directx/wine/dxgi/CMakeLists.txt @@ -13,12 +13,17 @@ list(APPEND SOURCE surface.c swapchain.c utils.c + dxgi_private.h) + +add_library(dxgi SHARED + ${SOURCE} guid.c + version.rc ${CMAKE_CURRENT_BINARY_DIR}/dxgi.def) -add_library(dxgi SHARED ${SOURCE} version.rc) set_module_type(dxgi win32dll) target_link_libraries(dxgi uuid dxgi_uuids wine) add_importlibs(dxgi wined3d msvcrt kernel32 ntdll) add_dependencies(dxgi wineheaders) +add_pch(dxgi dxgi_private.h SOURCE) add_cd_file(TARGET dxgi DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/msdmo/CMakeLists.txt b/reactos/dll/directx/wine/msdmo/CMakeLists.txt index a5ddd539f87..9ec8ff93bba 100644 --- a/reactos/dll/directx/wine/msdmo/CMakeLists.txt +++ b/reactos/dll/directx/wine/msdmo/CMakeLists.txt @@ -6,11 +6,16 @@ spec2def(msdmo.dll msdmo.spec) list(APPEND SOURCE dmoreg.c dmort.c + precomp.h) + +add_library(msdmo SHARED + ${SOURCE} stubs.c + rsrc.rc ${CMAKE_CURRENT_BINARY_DIR}/msdmo.def) -add_library(msdmo SHARED ${SOURCE} rsrc.rc) set_module_type(msdmo win32dll) target_link_libraries(msdmo uuid wine mediaobj_guid) add_importlibs(msdmo user32 advapi32 ole32 msvcrt kernel32 ntdll) +add_pch(msdmo precomp.h SOURCE) add_cd_file(TARGET msdmo DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/qedit/CMakeLists.txt b/reactos/dll/directx/wine/qedit/CMakeLists.txt index 54ef264792d..00f965b7dbf 100644 --- a/reactos/dll/directx/wine/qedit/CMakeLists.txt +++ b/reactos/dll/directx/wine/qedit/CMakeLists.txt @@ -7,11 +7,15 @@ list(APPEND SOURCE main.c mediadet.c samplegrabber.c + qedit_private.h) + +add_library(qedit SHARED + ${SOURCE} + qedit.rc ${CMAKE_CURRENT_BINARY_DIR}/qedit.def) -add_library(qedit SHARED ${SOURCE} qedit.rc) set_module_type(qedit win32dll) target_link_libraries(qedit strmiids uuid wine) add_importlibs(qedit ole32 oleaut32 msvcrt kernel32 ntdll) -add_pch(qedit qedit_private.h) +add_pch(qedit qedit_private.h SOURCE) add_cd_file(TARGET qedit DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/quartz/CMakeLists.txt b/reactos/dll/directx/wine/quartz/CMakeLists.txt index abfb560c601..490448bd0f7 100644 --- a/reactos/dll/directx/wine/quartz/CMakeLists.txt +++ b/reactos/dll/directx/wine/quartz/CMakeLists.txt @@ -35,11 +35,14 @@ list(APPEND SOURCE videorenderer.c vmr9.c waveparser.c + quartz_private.h) + +add_library(quartz SHARED + ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c ${CMAKE_CURRENT_BINARY_DIR}/quartz_strmif_p.c - ${CMAKE_CURRENT_BINARY_DIR}/quartz.def) - -add_library(quartz SHARED ${SOURCE} version.rc) + ${CMAKE_CURRENT_BINARY_DIR}/quartz.def + version.rc) add_idl_headers(quartz_idlheader fil_data.idl) @@ -56,5 +59,5 @@ set_module_type(quartz win32dll) target_link_libraries(quartz strmbase strmiids uuid dxguid wine ${PSEH_LIB}) add_importlibs(quartz dsound msacm32 msvfw32 ole32 oleaut32 shlwapi rpcrt4 user32 gdi32 advapi32 msvcrt kernel32 ntdll) add_dependencies(quartz dxsdk quartz_idlheader stdole2) -add_pch(quartz quartz_private.h) +add_pch(quartz quartz_private.h SOURCE) add_cd_file(TARGET quartz DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/directx/wine/wined3d/CMakeLists.txt b/reactos/dll/directx/wine/wined3d/CMakeLists.txt index a504e2bed86..99810a6ff4d 100644 --- a/reactos/dll/directx/wine/wined3d/CMakeLists.txt +++ b/reactos/dll/directx/wine/wined3d/CMakeLists.txt @@ -37,11 +37,15 @@ list(APPEND SOURCE view.c volume.c wined3d_main.c + wined3d_private.h) + +add_library(wined3d SHARED + ${SOURCE} + version.rc ${CMAKE_CURRENT_BINARY_DIR}/wined3d.def) -add_library(wined3d SHARED ${SOURCE} version.rc) set_module_type(wined3d win32dll) target_link_libraries(wined3d wine) add_importlibs(wined3d user32 opengl32 gdi32 advapi32 msvcrt kernel32 ntdll) -add_pch(wined3d wined3d_private.h) +add_pch(wined3d wined3d_private.h SOURCE) add_cd_file(TARGET wined3d DESTINATION reactos/system32 FOR all)