diff options
| author | Martin Müller <muemart@users.noreply.github.com> | 2016-11-22 09:44:37 +0100 |
|---|---|---|
| committer | Martin Müller <muemart@users.noreply.github.com> | 2016-11-22 09:44:37 +0100 |
| commit | 7ebd074e064dbbad24c0d04da62c429ce6290471 (patch) | |
| tree | 633764dbb4b3bca13cd7d5ef502e68ed4ff4e74d /ports/libxml2 | |
| parent | adc2a901b136dee5947c7c9e08cd9e4662f1af8d (diff) | |
| download | vcpkg-7ebd074e064dbbad24c0d04da62c429ce6290471.tar.gz vcpkg-7ebd074e064dbbad24c0d04da62c429ce6290471.zip | |
Use different output folder for every triplet, and add debug info to release builds
Diffstat (limited to 'ports/libxml2')
| -rw-r--r-- | ports/libxml2/0001-Fix-makefile-imports.patch | 27 | ||||
| -rw-r--r-- | ports/libxml2/0001-Fix-makefile.patch | 60 | ||||
| -rw-r--r-- | ports/libxml2/portfile.cmake | 16 |
3 files changed, 71 insertions, 32 deletions
diff --git a/ports/libxml2/0001-Fix-makefile-imports.patch b/ports/libxml2/0001-Fix-makefile-imports.patch deleted file mode 100644 index ae40648b9..000000000 --- a/ports/libxml2/0001-Fix-makefile-imports.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git "a/win32/Makefile.msvc" "b/win32/Makefile.msvc" -index d16c1a2..09d2291 100644 ---- "a/win32/Makefile.msvc" -+++ "b/win32/Makefile.msvc" -@@ -72,7 +72,7 @@ LIBS = - LIBS = $(LIBS) wsock32.lib ws2_32.lib - !endif - !if "$(WITH_ICONV)" == "1" --LIBS = $(LIBS) iconv.lib -+LIBS = $(LIBS) libiconv.lib libcharset.lib - !endif - !if "$(WITH_ICU)" == "1" - LIBS = $(LIBS) icu.lib -@@ -80,7 +80,11 @@ LIBS = $(LIBS) icu.lib - !if "$(WITH_ZLIB)" == "1" - # could be named differently zdll or zlib - # LIBS = $(LIBS) zdll.lib --LIBS = $(LIBS) zlib.lib -+!if "$(DEBUG)" == "1" -+LIBS = $(LIBS) zlibd.lib -+!else -+LIBS = $(LIBS) zlib.lib -+!endif - !endif - !if "$(WITH_LZMA)" == "1" - LIBS = $(LIBS) liblzma.lib -
\ No newline at end of file diff --git a/ports/libxml2/0001-Fix-makefile.patch b/ports/libxml2/0001-Fix-makefile.patch new file mode 100644 index 000000000..0e6c774dd --- /dev/null +++ b/ports/libxml2/0001-Fix-makefile.patch @@ -0,0 +1,60 @@ +--- + win32/Makefile.msvc | 22 ++++++++++++---------- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc +index d16c1a2..de9e22e 100644 +--- a/win32/Makefile.msvc ++++ b/win32/Makefile.msvc +@@ -28,11 +28,11 @@ XML_A = $(XML_BASENAME)_a.lib + XML_A_DLL = $(XML_BASENAME)_a_dll.lib + + # Place where we let the compiler put its output. +-BINDIR = bin.msvc +-XML_INTDIR = int.msvc +-XML_INTDIR_A = int.a.msvc +-XML_INTDIR_A_DLL = int.a.dll.msvc +-UTILS_INTDIR = int.utils.msvc ++BINDIR = $(OUTDIR)\bin.msvc ++XML_INTDIR = $(OUTDIR)\int.msvc ++XML_INTDIR_A = $(OUTDIR)\int.a.msvc ++XML_INTDIR_A_DLL = $(OUTDIR)\int.a.dll.msvc ++UTILS_INTDIR = $(OUTDIR)\int.utils.msvc + + # The preprocessor and its options. + CPP = cl.exe /EP +@@ -72,16 +72,18 @@ LIBS = + LIBS = $(LIBS) wsock32.lib ws2_32.lib + !endif + !if "$(WITH_ICONV)" == "1" +-LIBS = $(LIBS) iconv.lib ++LIBS = $(LIBS) libiconv.lib libcharset.lib + !endif + !if "$(WITH_ICU)" == "1" + LIBS = $(LIBS) icu.lib + !endif + !if "$(WITH_ZLIB)" == "1" +-# could be named differently zdll or zlib +-# LIBS = $(LIBS) zdll.lib ++!if "$(DEBUG)" == "1" ++LIBS = $(LIBS) zlibd.lib ++!else + LIBS = $(LIBS) zlib.lib + !endif ++!endif + !if "$(WITH_LZMA)" == "1" + LIBS = $(LIBS) liblzma.lib + !endif +@@ -101,10 +103,10 @@ ARFLAGS = /nologo + CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7 + LDFLAGS = $(LDFLAGS) /DEBUG + !else + CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 + # commented out as this break VC10 c.f. 634846 + # LDFLAGS = $(LDFLAGS) /OPT:NOWIN98 +-LDFLAGS = $(LDFLAGS) ++LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF /OPT:ICF + !endif + + # Libxml object files. +-- diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index 8bddd6c54..bb4e043b3 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -19,7 +19,7 @@ find_program(NMAKE nmake) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH}/ - PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-makefile-imports.patch + PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-makefile.patch ) set(SCRIPTS_DIR ${SOURCE_PATH}/win32) @@ -61,11 +61,14 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SCRIPTS_DIR} LOGNAME config-${TARGET_TRIPLET}-rel ) +# Handle build output directory +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" OUTDIR) +file(MAKE_DIRECTORY "${OUTDIR}") message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") message(STATUS "Building ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc rebuild + COMMAND ${NMAKE} /f Makefile.msvc rebuild OUTDIR=${OUTDIR} WORKING_DIRECTORY ${SCRIPTS_DIR} LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -73,7 +76,7 @@ message(STATUS "Building ${TARGET_TRIPLET}-rel done") message(STATUS "Installing ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc install + COMMAND ${NMAKE} /f Makefile.msvc install OUTDIR=${OUTDIR} WORKING_DIRECTORY ${SCRIPTS_DIR} LOGNAME install-${TARGET_TRIPLET}-rel ) @@ -103,11 +106,14 @@ vcpkg_execute_required_process( WORKING_DIRECTORY ${SCRIPTS_DIR} LOGNAME config-${TARGET_TRIPLET}-dbg ) +# Handle build output directory +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" OUTDIR) +file(MAKE_DIRECTORY "${OUTDIR}") message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") message(STATUS "Building ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc rebuild + COMMAND ${NMAKE} /f Makefile.msvc rebuild OUTDIR=${OUTDIR} WORKING_DIRECTORY ${SCRIPTS_DIR} LOGNAME build-${TARGET_TRIPLET}-dbg ) @@ -115,7 +121,7 @@ message(STATUS "Building ${TARGET_TRIPLET}-dbg done") message(STATUS "Installing ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${NMAKE} /f Makefile.msvc install + COMMAND ${NMAKE} /f Makefile.msvc install OUTDIR=${OUTDIR} WORKING_DIRECTORY ${SCRIPTS_DIR} LOGNAME install-${TARGET_TRIPLET}-dbg ) |
