[CMAKE] Don't use precompiled headers for autogenerated stub files

This commit is contained in:
Timo Kreuzer 2023-10-06 20:07:02 +03:00
parent f49919ce5d
commit 3b7c7d8e68
2 changed files with 6 additions and 0 deletions

View file

@ -425,6 +425,9 @@ function(spec2def _dllname _spec_file)
COMMAND native-spec2def -n=${_dllname} -a=${ARCH2} -d=${CMAKE_CURRENT_BINARY_DIR}/${_file}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c ${__with_relay_arg} ${__version_arg} ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
# Do not use precompiled headers for the stub file
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
if(__spec2def_ADD_IMPORTLIB)
set(_extraflags)
if(__spec2def_NO_PRIVATE_WARNINGS)

View file

@ -396,6 +396,9 @@ function(spec2def _dllname _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} ${__version_arg} ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def)
# Do not use precompiled headers for the stub file
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}_stubs.c PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
if(__spec2def_ADD_IMPORTLIB)
generate_import_lib(lib${_file} ${_dllname} ${_spec_file} "${__version_arg}")
if(__spec2def_NO_PRIVATE_WARNINGS)