- include wincodec_i.c into uuid on MSVC builds
- Improve midl support

svn path=/trunk/; revision=56283
This commit is contained in:
Timo Kreuzer
2012-03-30 15:36:19 +00:00
parent f9db30ea20
commit b8a853baee
5 changed files with 15 additions and 38 deletions
+13 -15
View File
@@ -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()
-12
View File
@@ -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)
+1 -4
View File
@@ -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})
@@ -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)
+1 -1
View File
@@ -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()