[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 commit b587e7b32, 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
commit 0d10fb814. 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:
Hermès Bélusca-Maïto 2024-06-04 21:59:43 +02:00
parent c97c1ad4c5
commit ee92f4b28e
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 2 additions and 6 deletions

View file

@ -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)