2021-04-27 01:28:21 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Meson is not able to automatically export symbols for DLLs
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
list(APPEND OPTIONS
|
|
|
|
-Dmmx=disabled
|
|
|
|
-Dsse2=disabled
|
|
|
|
-Dssse3=disabled)
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
|
|
set(VCPKG_CXX_FLAGS "/arch:SSE2 ${VCPKG_CXX_FLAGS}")
|
|
|
|
set(VCPKG_C_FLAGS "/arch:SSE2 ${VCPKG_C_FLAGS}")
|
|
|
|
list(APPEND OPTIONS
|
|
|
|
-Dmmx=enabled
|
|
|
|
-Dsse2=enabled
|
|
|
|
-Dssse3=enabled)
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
|
|
#x64 in general has all those intrinsics. (except for UWP for some reason)
|
|
|
|
list(APPEND OPTIONS
|
|
|
|
-Dmmx=enabled
|
|
|
|
-Dsse2=enabled
|
|
|
|
-Dssse3=enabled)
|
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm")
|
|
|
|
list(APPEND OPTIONS
|
|
|
|
#-Darm-simd=enabled does not work with arm64-windows
|
|
|
|
-Dmmx=disabled
|
|
|
|
-Dsse2=disabled
|
|
|
|
-Dssse3=disabled
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(PIXMAN_VERSION 0.40.0)
|
2016-11-26 07:48:19 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2018-09-12 04:11:51 +08:00
|
|
|
URLS "https://www.cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz"
|
|
|
|
FILENAME "pixman-${PIXMAN_VERSION}.tar.gz"
|
2021-04-27 01:28:21 +08:00
|
|
|
SHA512 063776e132f5d59a6d3f94497da41d6fc1c7dca0d269149c78247f0e0d7f520a25208d908cf5e421d1564889a91da44267b12d61c0bd7934cd54261729a7de5f
|
2016-11-26 07:48:19 +08:00
|
|
|
)
|
2018-09-12 04:11:51 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
|
|
|
REF ${PIXMAN_VERSION}
|
2021-04-27 01:28:21 +08:00
|
|
|
PATCHES remove_test_demos.patch
|
2018-09-12 04:11:51 +08:00
|
|
|
)
|
2021-04-27 01:28:21 +08:00
|
|
|
# Meson install wrongly pkgconfig file!
|
|
|
|
vcpkg_configure_meson(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS ${OPTIONS}
|
|
|
|
-Dlibpng=enabled
|
2016-11-26 07:48:19 +08:00
|
|
|
)
|
2021-04-27 01:28:21 +08:00
|
|
|
vcpkg_install_meson()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2016-11-26 07:48:19 +08:00
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2016-11-26 07:48:19 +08:00
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
# # Handle copyright
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|