mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 09:00:27 +00:00
[CMAKE/WIDL] Fix build
This commit is contained in:
parent
b587e7b32e
commit
acfff0919e
1 changed files with 5 additions and 3 deletions
|
@ -79,10 +79,10 @@ function(add_rpc_files __type)
|
||||||
get_defines(DEFINES)
|
get_defines(DEFINES)
|
||||||
# Is it a client or server module?
|
# Is it a client or server module?
|
||||||
if(__type STREQUAL "server")
|
if(__type STREQUAL "server")
|
||||||
set(__server_client -Oif -s -o)
|
set(__server_client -Oif -s)
|
||||||
set(__suffix _s)
|
set(__suffix _s)
|
||||||
elseif(__type STREQUAL "client")
|
elseif(__type STREQUAL "client")
|
||||||
set(__server_client -Oif -c -o)
|
set(__server_client -Oif -c)
|
||||||
set(__suffix _c)
|
set(__suffix _c)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Please pass either server or client as argument to add_rpc_files")
|
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})
|
set(__name ${CMAKE_CURRENT_BINARY_DIR}/${__name}${__suffix})
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${__name}.c ${__name}.h
|
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
|
DEPENDS ${FILE} native-widl
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
Loading…
Reference in a new issue