From acfff0919ebacc028f5000bbe8a7c0c7f3457772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Fri, 20 Nov 2020 10:12:31 +0100 Subject: [PATCH] [CMAKE/WIDL] Fix build --- sdk/cmake/widl-support.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/cmake/widl-support.cmake b/sdk/cmake/widl-support.cmake index 1b55d21b226..dbd5f3a73ab 100644 --- a/sdk/cmake/widl-support.cmake +++ b/sdk/cmake/widl-support.cmake @@ -79,10 +79,10 @@ function(add_rpc_files __type) get_defines(DEFINES) # Is it a client or server module? if(__type STREQUAL "server") - set(__server_client -Oif -s -o) + set(__server_client -Oif -s) set(__suffix _s) elseif(__type STREQUAL "client") - set(__server_client -Oif -c -o) + set(__server_client -Oif -c) set(__suffix _c) else() message(FATAL_ERROR "Please pass either server or client as argument to add_rpc_files") @@ -92,7 +92,9 @@ function(add_rpc_files __type) set(__name ${CMAKE_CURRENT_BINARY_DIR}/${__name}${__suffix}) add_custom_command( OUTPUT ${__name}.c ${__name}.h - COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} -h -H ${__name}.h ${__server_client} ${__name}.c ${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} ${__server_client} -o ${__name}.c -H ${__name}.h ${FILE} + COMMAND native-widl ${INCLUDES} ${DEFINES} ${IDL_FLAGS} ${__server_client} -h -H ${__name}.h ${FILE} DEPENDS ${FILE} native-widl WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endforeach()