mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 11:09:00 +08:00
659b6b5eea
* [zlib] Use readme as copyright * [soil2] update to 1.3.0 * [bento4] update to 1.6.0-639 * [bento4] fix version db * [zlib] Format manifest * [anglescript] Remove local license * [bustache] Update to master * [bustache] Don't update * version * version * remove version string * remove v * version * version * Fix version database. Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
48 lines
1.8 KiB
CMake
48 lines
1.8 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO madler/zlib
|
|
REF v1.2.12
|
|
SHA512 5b029532a9f5f12ad425c12eccdf1b77c8d91801342c5b5e26ffb539f76a204e6c4882b40f0130f143f2cd38df90e90af2978cf4bb997e1fa3a0d1eff2ca979e
|
|
HEAD_REF master
|
|
PATCHES
|
|
cmake_dont_build_more_than_needed.patch
|
|
0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
|
|
debug-postfix-mingw.patch
|
|
0002-android-build-mingw.patch
|
|
)
|
|
|
|
# This is generated during the cmake build
|
|
file(REMOVE "${SOURCE_PATH}/zconf.h")
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DSKIP_INSTALL_FILES=ON
|
|
-DSKIP_BUILD_EXAMPLES=ON
|
|
OPTIONS_DEBUG
|
|
-DSKIP_INSTALL_HEADERS=ON
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
# Install the pkgconfig file
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/zlib.pc" "-lz" "-lzlib")
|
|
endif()
|
|
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/zlib.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
|
endif()
|
|
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/zlib.pc" "-lz" "-lzlibd")
|
|
endif()
|
|
file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/zlib.pc" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
|
|
endif()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
file(INSTALL "${SOURCE_PATH}/README" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|