diff --git a/reactos/cmake/midl-support.cmake b/reactos/cmake/midl-support.cmake index 23973e5ccc3..662965f2323 100644 --- a/reactos/cmake/midl-support.cmake +++ b/reactos/cmake/midl-support.cmake @@ -25,9 +25,8 @@ function(add_idl_headers TARGET) get_defines(_defines) foreach(_idl_file ${ARGN}) get_filename_component(_name_we ${_idl_file} NAME_WE) - #set(_name ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}) add_custom_command( - OUTPUT ${_name_we}.h ${_name_we}_dummy_i.c + OUTPUT ${_name_we}.h COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /h ${_name_we}.h /iid ${_name_we}_dummy_i.c ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}) list(APPEND _target_dependencies ${_name_we}.h) @@ -38,15 +37,15 @@ endfunction() function(add_rpcproxy_files) get_includes(_includes) get_defines(_defines) - set(_output_files "") + set(_chain_dependency "") foreach(_idl_file ${ARGN}) get_filename_component(_name_we ${_idl_file} NAME_WE) add_custom_command( OUTPUT ${_name_we}_p.c ${_name_we}_p.h proxy.dlldata.c COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /proxy ${_name_we}_p.c /h ${_name_we}_p.h /dlldata proxy.dlldata.c ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file} ${_output_files}) - list(APPEND _output_files ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.c) - list(APPEND _output_files ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.h) + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file} ${_chain_dependency}) + list(APPEND _chain_dependency ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.c) + list(APPEND _chain_dependency ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}_p.h) endforeach() set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/proxy.dlldata.c PROPERTIES GENERATED TRUE) endfunction() @@ -64,16 +63,16 @@ function(add_rpc_files _type) else() message(FATAL_ERROR "Please pass either server or client as argument to add_rpc_files") endif() - foreach(FILE ${ARGN}) - get_filename_component(_name_we ${FILE} NAME_WE) - set(_name_we ${CMAKE_CURRENT_BINARY_DIR}/${_name_we}${_suffix}) - if(NOT IS_ABSOLUTE ${FILE}) - set(FILE ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}) + foreach(_idl_file ${ARGN}) + if(NOT IS_ABSOLUTE ${_idl_file}) + set(_idl_file ${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}) endif() + get_filename_component(_name_we ${_idl_file} NAME_WE) + set(_name_we ${_name_we}${_suffix}) add_custom_command( OUTPUT ${_name_we}.c ${_name_we}.h - COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /h ${_name_we}.h ${_server_client} ${_name_we}.c ${FILE} - DEPENDS ${FILE}) + COMMAND midl ${_includes} ${_defines} ${IDL_FLAGS} /h ${_name_we}.h ${_server_client} ${_name_we}.c ${_idl_file} + DEPENDS ${_idl_file}) endforeach() endfunction() @@ -81,8 +80,7 @@ function(generate_idl_iids _idl_file) get_includes(_includes) get_defines(_defines) - get_filename_component(_name ${_idl_file} NAME) - if(_name STREQUAL "${_idl_file}") + if(NOT IS_ABSOLUTE ${_idl_file}) set(_idl_file "${CMAKE_CURRENT_SOURCE_DIR}/${_idl_file}") endif() diff --git a/reactos/dll/win32/gdiplus/CMakeLists.txt b/reactos/dll/win32/gdiplus/CMakeLists.txt index 14a47231364..5210ceac9b1 100644 --- a/reactos/dll/win32/gdiplus/CMakeLists.txt +++ b/reactos/dll/win32/gdiplus/CMakeLists.txt @@ -28,12 +28,6 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/gdiplus_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/gdiplus.def) -if(MSVC) - set_source_files_properties(${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c PROPERTIES GENERATED TRUE) - list(APPEND SOURCE - ${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c) -endif() - add_library(gdiplus SHARED ${SOURCE}) set_module_type(gdiplus win32dll) target_link_libraries(gdiplus uuid wine) @@ -49,10 +43,4 @@ add_importlibs(gdiplus kernel32 ntdll) - - -if(ARCH MATCHES amd64) - target_link_libraries(gdiplus crt) -endif() - add_cd_file(TARGET gdiplus DESTINATION reactos/system32 FOR all) diff --git a/reactos/dll/win32/oleaut32/CMakeLists.txt b/reactos/dll/win32/oleaut32/CMakeLists.txt index 0b9c14af46b..138fbe01bbe 100644 --- a/reactos/dll/win32/oleaut32/CMakeLists.txt +++ b/reactos/dll/win32/oleaut32/CMakeLists.txt @@ -47,10 +47,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/oleaut32.def) if(MSVC) - set_source_files_properties(${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c PROPERTIES GENERATED TRUE) - list(APPEND SOURCE - ${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c - msvc.S) + list(APPEND SOURCE msvc.S) endif() add_library(oleaut32 SHARED ${SOURCE}) diff --git a/reactos/dll/win32/windowscodecs/CMakeLists.txt b/reactos/dll/win32/windowscodecs/CMakeLists.txt index f8b14c543f3..222603ecc14 100644 --- a/reactos/dll/win32/windowscodecs/CMakeLists.txt +++ b/reactos/dll/win32/windowscodecs/CMakeLists.txt @@ -41,12 +41,6 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/windowscodecs.def) -if(MSVC) - set_source_files_properties(${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c PROPERTIES GENERATED TRUE) - list(APPEND SOURCE - ${REACTOS_BINARY_DIR}/include/psdk/wincodec_i.c) -endif() - add_library(windowscodecs SHARED ${SOURCE}) set_module_type(windowscodecs win32dll) diff --git a/reactos/lib/sdk/uuid/CMakeLists.txt b/reactos/lib/sdk/uuid/CMakeLists.txt index 8b2dd887b09..86bfb21eb58 100644 --- a/reactos/lib/sdk/uuid/CMakeLists.txt +++ b/reactos/lib/sdk/uuid/CMakeLists.txt @@ -169,6 +169,7 @@ list(APPEND IDL_SOURCES tuner.idl vmr9.idl wia_xp.idl + wincodec.idl xmldom.idl xmldso.idl ctfutb.idl @@ -183,7 +184,6 @@ if(MSVC) else() list(APPEND IDL_SOURCES wbemcli.idl - wincodec.idl wuapi.idl) endif()