diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-09-15 07:45:22 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-09-15 08:42:54 +0200 |
commit | 63cf188ce0a47ddc162c4e4207a35d4d22f2662e (patch) | |
tree | eb93504cfaf9b7f256a25b3c88bce1213dc027f1 /external | |
parent | 937b780e3f696552fc686bf0c80c3050443b111a (diff) |
WIN add and apply default msbuild platform+config
Adds three Windows gb_* variables:
- gb_MSBUILD_CONFIG_AND_PLATFORM can be passed as msbuild flags
- gb_MSBUILD_PLATFORM maps debug / release settings
- gb_MSBUILD_CONFIG maps the CPUTYPE to the default msbuild names
and converts the users in external projects.
Change-Id: Ie9b817721180d78d104db11c44241e4b3e46bba9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102701
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'external')
-rw-r--r-- | external/cppunit/ExternalProject_cppunit.mk | 4 | ||||
-rw-r--r-- | external/curl/ExternalPackage_curl.mk | 2 | ||||
-rw-r--r-- | external/curl/ExternalProject_curl.mk | 2 | ||||
-rw-r--r-- | external/lcms2/ExternalProject_lcms2.mk | 4 | ||||
-rw-r--r-- | external/python3/ExternalProject_python3.mk | 10 |
5 files changed, 6 insertions, 16 deletions
diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk index 9b4a69c627e1..1c5ac725af59 100644 --- a/external/cppunit/ExternalProject_cppunit.mk +++ b/external/cppunit/ExternalProject_cppunit.mk @@ -17,8 +17,8 @@ ifeq ($(OS),WNT) $(call gb_ExternalProject_get_state_target,cppunit,build) : $(call gb_Trace_StartRange,cppunit,EXTERNAL) $(call gb_ExternalProject_run,build,\ - PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \ - /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \ + PROFILEFLAGS="$(gb_MSBUILD_CONFIG) \ + /p:Platform=$(gb_MSBUILD_PLATFORM) \ $(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \ $(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \ && msbuild.exe cppunit_dll.vcxproj /p:Configuration=$${PROFILEFLAGS} \ diff --git a/external/curl/ExternalPackage_curl.mk b/external/curl/ExternalPackage_curl.mk index 8da569e3e0cf..79a89a24a52c 100644 --- a/external/curl/ExternalPackage_curl.mk +++ b/external/curl/ExternalPackage_curl.mk @@ -14,7 +14,7 @@ $(eval $(call gb_ExternalPackage_use_external_project,curl,curl)) ifneq ($(DISABLE_DYNLOADING),TRUE) ifeq ($(COM),MSC) -$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll)) +$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(gb_MSBUILD_PLATFORM)-$(gb_MSBUILD_CONFIG)-dll-ipv6-sspi-winssl/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll)) else ifeq ($(OS),MACOSX) $(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib)) else ifeq ($(OS),AIX) diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk index f6eb073f5d39..138b50afd0e0 100644 --- a/external/curl/ExternalProject_curl.mk +++ b/external/curl/ExternalProject_curl.mk @@ -81,7 +81,7 @@ $(call gb_ExternalProject_get_state_target,curl,build): nmake -f Makefile.vc \ mode=dll \ VC=12 \ - $(if $(filter X86_64,$(CPUNAME)),MACHINE=x64,MACHINE=x86) \ + MACHINE=$(gb_MSBUILD_PLATFORM) \ GEN_PDB=$(if $(call gb_Module__symbols_enabled,curl),yes,no) \ DEBUG=$(if $(MSVC_USE_DEBUG_RUNTIME),yes,no) \ ENABLE_IPV6=yes \ diff --git a/external/lcms2/ExternalProject_lcms2.mk b/external/lcms2/ExternalProject_lcms2.mk index 6c30d6958f89..4bed4a5b705d 100644 --- a/external/lcms2/ExternalProject_lcms2.mk +++ b/external/lcms2/ExternalProject_lcms2.mk @@ -14,15 +14,13 @@ $(eval $(call gb_ExternalProject_register_targets,lcms2,\ )) ifeq ($(COM),MSC) - $(call gb_ExternalProject_get_state_target,lcms2,build): $(call gb_Trace_StartRange,lcms2,EXTERNAL) $(call gb_ExternalProject_run,build,\ MSBuild.exe lcms2_DLL.vcxproj \ + $(gb_MSBUILD_CONFIG_AND_PLATFORM) /p:TargetName=lcms2 \ $(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \ $(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \ - /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \ - /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) /p:TargetName=lcms2 \ ,Projects/VC2019/lcms2_DLL) $(call gb_Trace_EndRange,lcms2,EXTERNAL) else diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 2bc7d86c0678..ad110bbbc817 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -30,20 +30,12 @@ ifeq ($(OS),WNT) # TODO: using Debug configuration and related mangling of pyconfig.h -python3_WIN_PLATFORM_MSBUILD := $(strip \ - $(if $(filter INTEL,$(CPUNAME)),Win32) \ - $(if $(filter X86_64,$(CPUNAME)),x64) \ - $(if $(filter ARM64,$(CPUNAME)),arm64) \ - ) - # at least for MSVC 2008 it is necessary to clear MAKEFLAGS because # nmake is invoked $(call gb_ExternalProject_get_state_target,python3,build) : $(call gb_Trace_StartRange,python3,EXTERNAL) $(call gb_ExternalProject_run,build,\ - MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \ - /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \ - /p:Platform=$(python3_WIN_PLATFORM_MSBUILD) \ + MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build $(gb_MSBUILD_CONFIG_AND_PLATFORM) \ /p:opensslIncludeDir=$(call gb_UnpackedTarball_get_dir,openssl)/include \ /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl) \ /p:zlibDir=$(call gb_UnpackedTarball_get_dir,zlib) \ |