mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[SDK:CMAKE/IDL] Fix dependency tracking in generate_idl_iids() and extra cleanup.
Do the same in add_idl_reg_script() (currently unused helper) as well. This is an addendum to commitb587e7b32
, where the removal of the IDL_FILE_FULL variable definition, broke dependency tracking with the DEPENDS option. Now we use the correct variable. The problem was caught after doing a partial (non-clean) build after commit0d10fb814
. In this commit, two new interfaces, IExecuteCommand and IObjectWithSelection, were added in the psdk/shobjidl.idl file and used elsewhere. Recompilation correctly regenerated the corresponding header, psdk/shobjidl.h, but did not trigger a regeneration of the uuid static library (via the regeneration of sdk/lib/uuid/shobjidl_i.c), due to broken dependency tracking on the shobjidl.idl file. Because of this, the shobjidl_i.c did not contain the new GUID definitions for these new interfaces, IID_IExecuteCommand and IID_IObjectWithSelection, and triggered linking errors for the com_apitest, actxprxy and shell32 modules: ``` error LNK2001: unresolved external symbol _IID_IExecuteCommand error LNK2001: unresolved external symbol _IID_IObjectWithSelection fatal error LNK1120: 2 unresolved externals ```
This commit is contained in:
parent
c97c1ad4c5
commit
ee92f4b28e
2 changed files with 2 additions and 6 deletions
|
@ -83,11 +83,9 @@ function(generate_idl_iids)
|
|||
foreach(_idl_file ${ARGN})
|
||||
get_includes(_includes)
|
||||
get_defines(_defines)
|
||||
|
||||
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)
|
||||
add_custom_command(
|
||||
OUTPUT ${_name_we}_i.c ${_name_we}_i.h
|
||||
|
@ -98,7 +96,6 @@ function(generate_idl_iids)
|
|||
endfunction()
|
||||
|
||||
function(add_iid_library _target)
|
||||
|
||||
foreach(_idl_file ${ARGN})
|
||||
generate_idl_iids(${_idl_file})
|
||||
get_filename_component(_name_we ${_idl_file} NAME_WE)
|
||||
|
|
|
@ -105,14 +105,13 @@ endfunction()
|
|||
|
||||
function(generate_idl_iids)
|
||||
foreach(IDL_FILE ${ARGN})
|
||||
get_filename_component(FILE ${IDL_FILE} NAME)
|
||||
get_includes(INCLUDES)
|
||||
get_defines(DEFINES)
|
||||
get_filename_component(NAME ${IDL_FILE} NAME_WE)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c
|
||||
COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -u -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c ${IDL_FILE}
|
||||
DEPENDS ${IDL_FILE_FULL} native-widl
|
||||
DEPENDS ${IDL_FILE} native-widl
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
@ -135,7 +134,7 @@ function(add_idl_reg_script IDL_FILE)
|
|||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_r.res
|
||||
COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -r -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_r.res ${IDL_FILE}
|
||||
DEPENDS ${IDL_FILE_FULL} native-widl
|
||||
DEPENDS ${IDL_FILE} native-widl
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${NAME}_r.res PROPERTIES
|
||||
GENERATED TRUE EXTERNAL_OBJECT TRUE)
|
||||
|
|
Loading…
Reference in a new issue