[CMAKE/WIDL] Fix build (try 2)

This commit is contained in:
Jérôme Gardou 2020-11-20 10:17:43 +01:00
parent acfff0919e
commit 8297109b95

View file

@ -61,7 +61,9 @@ function(add_rpcproxy_files)
list(APPEND IDL_DEPS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} ${EXTRA_DEP})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.h
COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -p -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c -h -H ${NAME}_p.h ${FILE}
# We generate the two files in two passes because WIDL doesn't cope with being given two absolute paths as output
COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -p -o ${CMAKE_CURRENT_BINARY_DIR}/${NAME}_p.c -H ${NAME}_p.h ${FILE}
COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -p -h -H ${NAME}_p.h ${FILE}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} ${EXTRA_DEP} native-widl
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endforeach()