[SDK] Add the WITH_RELAY option to msvc's spec2def command. (GCC already had it)

This commit is contained in:
Mark Jansen 2018-09-05 21:51:59 +02:00
parent d564c7c8e3
commit 4e3f76352a
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -401,7 +401,7 @@ else()
endif()
function(spec2def _dllname _spec_file)
cmake_parse_arguments(__spec2def "ADD_IMPORTLIB;NO_PRIVATE_WARNINGS" "" "" ${ARGN})
cmake_parse_arguments(__spec2def "ADD_IMPORTLIB;NO_PRIVATE_WARNINGS;WITH_RELAY" "" "" ${ARGN})
# Get library basename
get_filename_component(_file ${_dllname} NAME_WE)
@ -411,10 +411,14 @@ function(spec2def _dllname _spec_file)
message(FATAL_ERROR "spec2def only takes spec files as input.")
endif()
if (__spec2def_WITH_RELAY)
set(__with_relay_arg "--with-tracing")
endif()
# Generate exports def and C stubs file for the DLL
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def ${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c
COMMAND native-spec2def --ms -a=${SPEC2DEF_ARCH} -n=${_dllname} -d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
COMMAND native-spec2def --ms -a=${SPEC2DEF_ARCH} -n=${_dllname} -d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${__with_relay_arg} ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
if(__spec2def_ADD_IMPORTLIB)