1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval
$(call gb_ExternalProject_ExternalProject
,cppunit
))
12 $(eval
$(call gb_ExternalProject_register_targets
,cppunit
,\
17 $(call gb_ExternalProject_get_state_target
,cppunit
,build
) :
18 $(call gb_ExternalProject_run
,build
,\
19 PROFILEFLAGS
="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
20 /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
21 $(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
22 $(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
23 $(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
24 && msbuild.exe cppunit_dll.vcxproj
/p
:Configuration
=$${PROFILEFLAGS} \
25 && cd ..
/DllPlugInTester \
26 && msbuild.exe DllPlugInTester.vcxproj
/p
:Configuration
=$${PROFILEFLAGS} \
30 cppunit_CXXFLAGS
=$(CXXFLAGS
)
32 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD iOS LINUX NETBSD OPENBSD
,$(OS
)))
33 ifneq (,$(gb_ENABLE_DBGUTIL
))
34 cppunit_CXXFLAGS
+=-D_GLIBCXX_DEBUG
42 $(call gb_ExternalProject_get_state_target
,cppunit
,build
) :
43 $(call gb_ExternalProject_run
,build
,\
45 --disable-dependency-tracking \
46 $(if
$(filter TRUE
,$(DISABLE_DYNLOADING
)),--disable-shared
,--disable-static
) \
49 --disable-latex-docs \
51 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
52 $(if
$(filter MACOSX
,$(OS
)),--prefix=/@.__________________________________________________NONE
) \
53 $(if
$(filter WNT
,$(OS
)),LDFLAGS
="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
54 $(if
$(filter SOLARIS
,$(OS
)),LIBS
="-lm") \
55 $(if
$(filter ANDROID
,$(OS
)),LIBS
="$(gb_STDLIBS)") \
56 CXXFLAGS
="$(cppunit_CXXFLAGS)" \
62 # vim: set noet sw=4 ts=4: