aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2019-01-04 15:37:46 -0800
committerGerald Combs <gerald@wireshark.org>2019-03-18 22:22:44 +0000
commitacc96e5206ca731c791dcae537fc7ae3a08b4e65 (patch)
treee53240afd4463cb13316cb0394126d0e2c011504 /CMakeLists.txt
parentf57a73d688cbbc1207a4ad6ceb41933ebf17171c (diff)
Windows: Start using a `vcpkg export` bundle.
Create a library bundle using `vcpkg export ... --zip` as described at https://vcpkg.readthedocs.io/en/latest/users/integration/#export-command. The bundle includes the following packages: gettext 0.19-8 glib 2.52.3-13 libffi 3.1-4 libiconv 1.15-5 liblzma 5.2.4 libxml2 2.9.9-4 pcre 8.41-1 zlib 1.2.11-5 It also includes a CMake toolchain file which we might want to make use of in the future. This means we no longer compile Zlib locally. Update the CMake environment accordingly and remove zlib from win-setup.ps1. It includes PDBs, so add them to the PDB .zip. Change-Id: I0a94904a86d836e990019dab62af506573be1f35 Reviewed-on: https://code.wireshark.org/review/31377 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt45
1 files changed, 14 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 600406c66d..7c6d16c424 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1096,31 +1096,7 @@ ws_find_package(KERBEROS ENABLE_KERBEROS HAVE_KERBEROS)
ws_find_package(CARES ENABLE_CARES HAVE_C_ARES "1.5.0")
# Zlib compression
-if(ENABLE_ZLIB)
- if (WIN32)
- # On Windows we build our own version of zlib, so add the paths
- set(ZLIB_SRC_DIR "${_PROJECT_LIB_DIR}/zlib-1.2.11-2-ws")
- set(SKIP_INSTALL_STATIC True)
- set(SKIP_INSTALL_HEADERS True)
- set(SKIP_INSTALL_FILES True)
- set(ZLIB_EXPORTS "WiresharkTargets")
- add_subdirectory("${ZLIB_SRC_DIR}" "${CMAKE_BINARY_DIR}/zlib")
- unset(SKIP_INSTALL_STATIC)
- unset(SKIP_INSTALL_HEADERS)
- unset(SKIP_INSTALL_FILES)
- set(ZLIB_INCLUDE_DIR "${ZLIB_SRC_DIR}" "${CMAKE_BINARY_DIR}/zlib")
- set(ZLIB_LIBRARY zlib)
- set(ZLIB_DLL "zlib1.dll")
- set_target_properties(zlib PROPERTIES FOLDER "Libs/zlib")
- # Annoyingly zlib also builds some other stuff we aren't interested in
- set_target_properties(zlibstatic PROPERTIES
- FOLDER "Libs/zlib"
- EXCLUDE_FROM_ALL True
- EXCLUDE_FROM_DEFAULT_BUILD True
- )
- endif()
- ws_find_package(ZLIB ENABLE_ZLIB HAVE_ZLIB)
-endif()
+ws_find_package(ZLIB ENABLE_ZLIB HAVE_ZLIB)
# LZ4 compression
ws_find_package(LZ4 ENABLE_LZ4 HAVE_LZ4)
@@ -1715,13 +1691,11 @@ if(WIN32)
# XXX Can (and should) we iterate over these similar to the way
# the top-level CMakeLists.txt iterates over the package list?
- # Required DLLs.
- # The gio, gnutls, png, and other OBS-generated DLLs depend on
- # zlib1.dll. We compile zlib locally but the Debug configuration
- # (the default) creates zlibd1.dll.
+ # Required DLLs and their corresponding PDBs.
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${GLIB2_DLLS} $<$<CONFIG:Debug>:zlib1.dll>
+ ${GLIB2_DLLS}
+ ${GLIB2_PDBS}
"${_dll_output_dir}"
WORKING_DIRECTORY "${GLIB2_DLL_DIR}"
)
@@ -1770,7 +1744,12 @@ if(WIN32)
list (APPEND OPTIONAL_DLLS "${BCG729_DLL_DIR}/${BCG729_DLL}")
endif(BCG729_FOUND)
if (LIBXML2_FOUND)
- list (APPEND OPTIONAL_DLLS "${LIBXML2_DLL_DIR}/${LIBXML2_DLL}")
+ foreach( _dll ${LIBXML2_DLLS} )
+ list (APPEND OPTIONAL_DLLS "${LIBXML2_DLL_DIR}/${_dll}")
+ endforeach(_dll)
+ foreach( _pdb ${LIBXML2_PDBS} )
+ list (APPEND OPTIONAL_PDBS "${LIBXML2_DLL_DIR}/${_pdb}")
+ endforeach(_pdb)
endif(LIBXML2_FOUND)
if (SMI_FOUND)
list (APPEND OPTIONAL_DLLS "${SMI_DLL_DIR}/${SMI_DLL}")
@@ -1819,6 +1798,10 @@ if(WIN32)
if (WINSPARKLE_FOUND)
list (APPEND OPTIONAL_DLLS "${WINSPARKLE_DLL_DIR}/${WINSPARKLE_DLL}")
endif(WINSPARKLE_FOUND)
+ if (ZLIB_FOUND)
+ list (APPEND OPTIONAL_DLLS "${ZLIB_DLL_DIR}/${ZLIB_DLL}")
+ list (APPEND OPTIONAL_PDBS "${ZLIB_DLL_DIR}/${ZLIB_PDB}")
+ endif(ZLIB_FOUND)
# With libs downloaded to c:/wireshark-win64-libs this currently
# (early 2018) expands to about 1900 characters.