diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-11-27 14:13:15 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-11-28 08:35:06 +0100 |
commit | e0d94237878d4949573fc9b6d97eea3146cada6d (patch) | |
tree | 53ac4cc5bf984f9df17d218720588721f16bb0bd /external/libassuan | |
parent | ecd683d3f98444b69a96cbf8bff57d4e691e6cfd (diff) |
Use Executable_cpp instead of default gcc as preprocessor for windres
...to avoid having GCC as yet another prerequisite on Windows.
Cygwin 'man windres' states: "The default preprocessor argument is 'gcc -E
-xc-header -DRC_INVOKED'." Of those arguments, -E and -xc-header are not
relevant for Executable_cpp, so only -DRC_INVOKED is kept.
Additional arguments that turned out to be necessary are:
-I$(ATL_INCLUDE)
So that
#include <afxres.h>
in workdir/UnpackedTarball/libgpg-error/src/versioninfo.rc is found. (Not sure
how the original code using gcc found this.)
-+
So that using a C++ style comment in
#include "winres.h" // extract from windows header
in afxres.h does not cause a "Syntax error in #include" from Executable_cpp.
$(SOLARINC)
So that
#include "winres.h" // extract from windows header
in afxres.h is found. (Not sure how the original code using gcc found this.)
-DWINAPI_FAMILY=0
Because dlgs.h (included indirectly from afxres.h) contains
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
[...]
typedef struct tagCRGB
{
BYTE bRed;
BYTE bGreen;
BYTE bBlue;
BYTE bExtra;
} CRGB; /* RGB Color */
and the WINAPI_FAMILY_PARTITION conditional (defined in winapifamily.h) would be
true, causing the output to contain those "typedef struct tagCRGB ..." tokens
that windres apparently doesn't expect (failing with "windres: can't open file
`tagCRGB': No such file or directory"). (Not sure how the original code using
gcc avoided this.)
Change-Id: Ic2d031c72025f2e9dbde26c774215d2d2d0a43a9
Reviewed-on: https://gerrit.libreoffice.org/45334
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/libassuan')
-rw-r--r-- | external/libassuan/ExternalProject_libassuan.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk index 21d034455dca..fdadb2851042 100644 --- a/external/libassuan/ExternalProject_libassuan.mk +++ b/external/libassuan/ExternalProject_libassuan.mk @@ -20,7 +20,7 @@ $(eval $(call gb_ExternalProject_use_externals,libassuan,\ )) ifeq ($(COM),MSC) -$(call gb_ExternalProject_get_state_target,libassuan,build): +$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target,cpp) $(call gb_ExternalProject_run,build,\ autoreconf \ && ./configure \ @@ -32,6 +32,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \ --host=$(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) \ MAKE=$(MAKE) \ + RC='windres --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC) -I$(ATL_INCLUDE)'\' \ && $(MAKE) \ ) |