vcpkg/ports/podofo/portfile.cmake
Jack·Boos·Yu f23ebed76f
[cmake] Update to 3.17.2 (#10767)
* [cmake] Update to 3.17.1

* update cmake directory name

* [cpuid] Fix install headers.

* [stormlib] Fix install headers

* [murmurhash] Fix install headers

* [metrohash] Fix install headers

* update baseline

* update baseline

* [otl] update hash

* update baseline

* [gts] Do not use ninja to avoid empty implib issue

* update baseline

* [dmlc] Re-trigger ci test

* [replxx] Re-trigger ci test

* update baseline

* [osg] Re-trigger ci test

* [replxx] Fix build failure

* Set cmake min version to 3.17.1

* update baseline

* [libnice] Re-trigger ci test

* [mlpack] Re-trigger ci test

* update to 3.17.2

* update cmake hash

* update baseline

* update baseline

* update baseline

* update baseline

* Update scripts/ci.baseline.txt

Co-authored-by: Billy O'Neal <billy.oneal@gmail.com>

* update baseline

* update baseline

* [magnum] Set magnum:arm64-windows to skip in baseline

* [nanogui] Set nanogui:arm64-windows to fail in baseline

* [nettle] Set nettle:x64-windows to fail, waiting for fix this issue in another PR

* re-trigger CI test

* update baseline

* Install unixODBC in Linux

* [nanodbc] Re-trigger CI test

* update baseline

* Remove space

* update baseline
2020-05-19 14:47:19 -07:00

58 lines
1.9 KiB
CMake

set(PODOFO_VERSION 0.9.6)
vcpkg_download_distfile(ARCHIVE
URLS "https://sourceforge.net/projects/podofo/files/podofo/${PODOFO_VERSION}/podofo-${PODOFO_VERSION}.tar.gz/download"
FILENAME "podofo-${PODOFO_VERSION}.tar.gz"
SHA512 35c1a457758768bdadc93632385f6b9214824fead279f1b85420443fb2135837cefca9ced476df0d47066f060e9150e12fcd40f60fa1606b177da433feb20130
)
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(ADDITIONAL_PATCH "0003-uwp_fix.patch")
endif()
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${PODOFO_VERSION}
PATCHES
0001-unique_ptr.patch
0002-HAVE_UNISTD_H.patch
${ADDITIONAL_PATCH}
)
set(PODOFO_NO_FONTMANAGER ON)
if("fontconfig" IN_LIST FEATURES)
set(PODOFO_NO_FONTMANAGER OFF)
endif()
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PODOFO_BUILD_SHARED)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC)
set(IS_WIN32 OFF)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
set(IS_WIN32 ON)
endif()
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindOpenSSL.cmake)
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindZLIB.cmake)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DPODOFO_BUILD_LIB_ONLY=1
-DPODOFO_BUILD_SHARED=${PODOFO_BUILD_SHARED}
-DPODOFO_BUILD_STATIC=${PODOFO_BUILD_STATIC}
-DPODOFO_NO_FONTMANAGER=${PODOFO_NO_FONTMANAGER}
-DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=${PODOFO_NO_FONTMANAGER}
-DCMAKE_DISABLE_FIND_PACKAGE_LIBCRYPTO=${IS_WIN32}
-DCMAKE_DISABLE_FIND_PACKAGE_LIBIDN=ON
-DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)